diff --git a/CREDITS b/CREDITS index 557ed55ee..4e20be5c7 100644 --- a/CREDITS +++ b/CREDITS @@ -11,8 +11,12 @@ First, the obvious ones: Now, some miscellaneous files: --quads/qsort_reentrant.{c,h} - Yoinked from FreeBSD. Distributed under the BSD license, big surprise. +-util/EXIF.py + 3-clause BSD license. + https://github.com/ianare/exif-py + +-util/ctmf.c + (c) Simon Perreault, licensed under the GPL v3+. -util/bt.c AVL code was yoinked from GNU libavl which is under the GPL. @@ -22,6 +26,28 @@ Now, some miscellaneous files: http://cutest.sourceforge.net/ zlib/libpng license. +-util/md5.{c,h} + (c) Christophe Devine, licensed under the GPL v2+. + +-util/qsort_reentrant.{c,h} + From FreeBSD. Distributed under the BSD license, big surprise. + +-util/radix.c + (c) Herf Consulting LLC + Use for anything you want, just tell me what you do with it. + +-sdss/sqlcl.py + (c) Tamas Budavari + +-sdss/yanny.py + (c) Ben Weaver + +-blind/an_mm_malloc.h + (c) FSF, from GCC. Imported for use by ctmf.c + +-blind/anet.py + (c) Josh Bloom, licensed under GPL v3. + -blind/{tablist,modhead,fitscopy,tabmerge,fitstomatlab,liststruc,listhead, imcopy,imarith,imstat}.c From the CFITSIO utilities web page. @@ -29,18 +55,31 @@ Now, some miscellaneous files: "You may freely modify, reuse, and redistribute these programs as you wish." (fitstomatlab.c is just a modified version of tablist.c) --tilecache/web/map.js includes code borrowed from wms236.js by John Deck, - UC Berkeley. +-blind/fitsverify.c + From the "fitsverify" tool, + http://heasarc.gsfc.nasa.gov/docs/software/ftools/fitsverify/ --tilecache/web/map.js includes code borrowed from: - http://www.scottandrew.com/weblog/jsjunk#inpoly - Copyright 2001 scott andrew lepera - --quads/pnpoly.c +-blind/pnpoly.c + (c) Wm. Randolph Franklin, MIT license From http://www.ecse.rpi.edu/Homepages/wrf/Research/Short_Notes/pnpoly.html +-blind/spike_join.c + (c) Christopher Stumm, GPL v2+ + +-catalogs/ucac4-fits.c, ucac4.c, ucac4tofits.c + (c) Michal Kočer, Klet Observatory, GPL v2 + +-libkd/an-fls.h + (c) Linus Torvalds, GPL v2 + + Data files: +-catalogs/constellation-boundaries.c + IAU Constellation boundaries, in J2000, from + http://vizier.cfa.harvard.edu/viz-bin/VizieR-3?-source=VI/49/bound_20 + + -catalogs/ngc2000{,names}.dat Imported from ftp://cdsarc.u-strasbg.fr/cats/VII/118/ NGC 2000.0, The Complete New General Catalogue and Index Catalogue diff --git a/LICENSE b/LICENSE deleted file mode 100644 index d511905c1..000000000 --- a/LICENSE +++ /dev/null @@ -1,339 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Lesser General Public License instead.) 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 -this service 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 make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. 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. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute 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 and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -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 -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the 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 a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, 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. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE 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. - - 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 -convey 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 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. - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision 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, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This 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. diff --git a/README.md b/README.md index 033418b9a..e0cc1c7c6 100644 --- a/README.md +++ b/README.md @@ -19,14 +19,20 @@ Latest release: http://astrometry.net/downloads/astrometry.net-latest.tar.gz > archival disarray. We hope this will help organize, annotate and make > searchable all the world's astronomical information. -Copyright 2006-2014 Michael Blanton, David W. Hogg, Dustin Lang, Keir -Mierle and Sam Roweis. +Copyright 2006-2015 Michael Blanton, David W. Hogg, Dustin Lang, Keir +Mierle and Sam Roweis (the Astrometry.net Team). Contributions from Sjoert van Velzen, Themos Tsikas (wcs-match.c), -Andrew Hood, Thomas Stibor, Denis Vida, Ole Streicher and others. +Andrew Hood, Thomas Stibor, Denis Vida, Ole Streicher, David +Warde-Farley, Jon Barron, and others. -Licensed under GPLv2. Please contact us about other licensing -arrangements. +Parts of the code written by the Astrometry.net Team are licensed +under a 3-clause BSD-style license. See the file LICENSE for the full +license text. However, since this code uses libraries licensed under +the GNU GPL, the whole work is distributed under the GPL version 3 or +later. + +Code development happens at http://github.com/dstndstn/astrometry.net The documentation is at http://astrometry.net/doc @@ -38,7 +44,6 @@ Code snapshots and releases are at http://astrometry.net/downloads The web service is at http://nova.astrometry.net - For academic use, please cite the paper: > Lang, D., Hogg, D.W., Mierle, K., Blanton, M., & Roweis, S., diff --git a/blind/2mass-cut.py b/blind/2mass-cut.py index fa091b450..3aabd4faf 100644 --- a/blind/2mass-cut.py +++ b/blind/2mass-cut.py @@ -1,3 +1,5 @@ +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE from astrometry.util.fits import * from numpy import logical_and diff --git a/blind/Makefile b/blind/Makefile index 989e7d131..405df3246 100644 --- a/blind/Makefile +++ b/blind/Makefile @@ -1,18 +1,5 @@ # This file is part of the Astrometry.net suite. -# Copyright 2006-2008 Dustin Lang, Keir Mierle and Sam Roweis. -# -# The Astrometry.net suite 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, version 2. -# -# The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# Licensed under a 3-clause BSD style license - see LICENSE BASEDIR := .. COMMON := $(BASEDIR)/util diff --git a/blind/README b/blind/README deleted file mode 100644 index 0ef4af03f..000000000 --- a/blind/README +++ /dev/null @@ -1,60 +0,0 @@ -[Note, this is an old file; current Astrometry.net document (such as it is) is -mostly on the Wiki at trac.astrometry.net] - - -Research Code Snapshot (April 2007) for Astrometry.net -========================================================= -Copyright 2006, 2007 David W. Hogg, Dustin Lang, Keir Mierle and Sam Roweis. - -This code is meant as an accompanyment for an upcoming paper and its main -purpose is to allow reproduction of the results in that paper. - -This is research code only and is not intended for scientific use in reducing -data or other analyses. - -This release includes a snapshot of all of the components of our current -research code, including routines to: - * Convert raw USNO and Tycho2 into FITS format for easier use - * Uniformize, deduplicate, and cut the FITSified catalogs - * A simple but powerful HEALPIX implementation - * QFITS library with several modifications - * libkd, a compact and high-performance kdtree library - * Build the files and data structures our system requires - (indexes) to build a blind astrometry solver. - -In principle, the code in the tarball is sufficient to reproduce our entire -astrometry system and replicate our blind astrometry results (e.g. on the SDSS -fields). However, this requires the entire USNO-B 1.0 catalogue which is about -80GB in size. Therefore, as a proof of concept, we have released an -intermediate file representing the processed catalog data from 1/12th of the -sky (including converting USNO to fits, uniformizing, cutting by magnitude and -building a star kd-tree datastructure). - -Using this intermediate file, it is possible to build the remainder of the -index files necessary to blindly solve the astrometry for SDSS-like fields that -are contained within that particular 1/12th of the sky. We have included some -example SDSS fields in this region which can be used to verify that the system -has been installed correctly. - -Quick start instructions: -1) Go to a directory with 3GB free. -2) Download and run the file http://astrometry.net/???/getcode.sh - (it will take about 20mins on a modern workstation). - -Solving new fields??? -- What exactly do you need to do to solve a sloan field? -- What is in out? -- About printsolved to see what actually got solved -- input format the file needs to come in - - single field per file, one star per line - - each line is x y, as read by fscanf("%lf %lf\n") -- printmatch - -LICENSE ------- -The Astrometry.net suite is free software licensed under the GNU GPL, -version 2. See the file LICENSE for the full terms of the GNU GPL. - -CONTACT -------- -Please send inquires/bug reports to code@astrometry.net diff --git a/blind/add-text.c b/blind/add-text.c index 96b52a912..76d9d9dee 100644 --- a/blind/add-text.c +++ b/blind/add-text.c @@ -1,3 +1,7 @@ +/* +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE + */ #include #include #include diff --git a/blind/agreeable.c b/blind/agreeable.c index cc043267c..d419542a4 100644 --- a/blind/agreeable.c +++ b/blind/agreeable.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/blind/allquads-main.c b/blind/allquads-main.c index 7c992066a..0b7cba22c 100644 --- a/blind/allquads-main.c +++ b/blind/allquads-main.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2009 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/blind/allquads.c b/blind/allquads.c index 90d9cc5c2..36efd2fbe 100644 --- a/blind/allquads.c +++ b/blind/allquads.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2009 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/blind/augment-xylist-main.c b/blind/augment-xylist-main.c index 2c3e87903..322591d5c 100644 --- a/blind/augment-xylist-main.c +++ b/blind/augment-xylist-main.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2007-2008 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ /** diff --git a/blind/augment-xylist.c b/blind/augment-xylist.c index dd1c625a5..5a087ec8c 100644 --- a/blind/augment-xylist.c +++ b/blind/augment-xylist.c @@ -1,20 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2007-2009 Dustin Lang, Keir Mierle and Sam Roweis. - Copyright 2010, 2011 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ /** diff --git a/blind/backend_client.py b/blind/backend_client.py deleted file mode 100644 index 2cde52708..000000000 --- a/blind/backend_client.py +++ /dev/null @@ -1,27 +0,0 @@ -import sys -import socket -import time - -if __name__ == '__main__': - jobfile = sys.argv[1] - cancelfile = sys.argv[2] - - daemon = ('127.0.0.1', 9999) - - s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) - s.connect(daemon) - s.sendall('job %s %s\n' % (jobfile, cancelfile)) - - f = s.makefile('r') - # Pipe from socket to stderr. - while True: - try: - line = f.readline() - if line == '': - break - sys.stderr.write(line) - except: - break - f.close() - s.close() - diff --git a/blind/bands.py b/blind/bands.py index 659c6c2ca..4210e7cf0 100644 --- a/blind/bands.py +++ b/blind/bands.py @@ -1,3 +1,5 @@ +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE from pylab import * from numpy import * from math import * diff --git a/blind/bgsubtract.c b/blind/bgsubtract.c index dce2e7f5d..4e4c21e51 100644 --- a/blind/bgsubtract.c +++ b/blind/bgsubtract.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/blind/blind-main.c b/blind/blind-main.c index ea386eddc..75e59d3ae 100644 --- a/blind/blind-main.c +++ b/blind/blind-main.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2007 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/blind/blind.c b/blind/blind.c index 3fbe56961..f3aa09041 100644 --- a/blind/blind.c +++ b/blind/blind.c @@ -1,20 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. - Copyright 2008-2010 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ /** diff --git a/blind/blind.i b/blind/blind.i index 12312dfbc..353d414fd 100644 --- a/blind/blind.i +++ b/blind/blind.i @@ -1,3 +1,7 @@ +/* +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE + */ %module(package="astrometry.blind") blind %include diff --git a/blind/blindutils.c b/blind/blindutils.c index 2c15654f8..0a7ef6abb 100644 --- a/blind/blindutils.c +++ b/blind/blindutils.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2007 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/blind/build-index-main.c b/blind/build-index-main.c index 64d7fcdcf..d44109771 100644 --- a/blind/build-index-main.c +++ b/blind/build-index-main.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2009, 2010, 2011 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/blind/build-index.c b/blind/build-index.c index 667fb5cfa..ed885b47c 100644 --- a/blind/build-index.c +++ b/blind/build-index.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2009, 2010, 2011 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/blind/catalog.c b/blind/catalog.c index 894a3477b..b0197e14b 100644 --- a/blind/catalog.c +++ b/blind/catalog.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/blind/catalog_analysis.c b/blind/catalog_analysis.c index bfc8d998a..0be0f409e 100644 --- a/blind/catalog_analysis.c +++ b/blind/catalog_analysis.c @@ -1,20 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 David Warde-Farley, Dustin Lang, Keir Mierle - and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ diff --git a/blind/centroid-noise.py b/blind/centroid-noise.py index a13b93d8b..e77d9e5a8 100644 --- a/blind/centroid-noise.py +++ b/blind/centroid-noise.py @@ -1,3 +1,5 @@ +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE import sys import matplotlib diff --git a/blind/certifiable.c b/blind/certifiable.c index 4f3b1b33f..9d02f0504 100644 --- a/blind/certifiable.c +++ b/blind/certifiable.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include @@ -27,7 +14,6 @@ #include "matchobj.h" #include "matchfile.h" #include "rdlist.h" -#include "histogram.h" #include "solvedfile.h" char* OPTIONS = "hR:A:B:n:t:f:C:T:F:i:I:m:M:"; diff --git a/blind/checkquads.c b/blind/checkquads.c index 8839d36ec..63c079b7a 100644 --- a/blind/checkquads.c +++ b/blind/checkquads.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ /* diff --git a/blind/codefile.c b/blind/codefile.c index 12f9c377f..72a1896df 100644 --- a/blind/codefile.c +++ b/blind/codefile.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/blind/codeprojections.c b/blind/codeprojections.c index 57f5eb6e6..e68aab979 100644 --- a/blind/codeprojections.c +++ b/blind/codeprojections.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ /** diff --git a/blind/codetree-main.c b/blind/codetree-main.c index d69a5a860..581741e41 100644 --- a/blind/codetree-main.c +++ b/blind/codetree-main.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006-2008 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ /** diff --git a/blind/codetree.c b/blind/codetree.c index 402aee770..c85cf3464 100644 --- a/blind/codetree.c +++ b/blind/codetree.c @@ -1,20 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006-2008 Dustin Lang, Keir Mierle and Sam Roweis. - Copyright 2009, 2012 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ /** diff --git a/blind/control-program.c b/blind/control-program.c index b52ae3a37..f7f1c3272 100644 --- a/blind/control-program.c +++ b/blind/control-program.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2008 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ /** diff --git a/blind/crawl-ftp.py b/blind/crawl-ftp.py index 48952457f..18d84c6ee 100644 --- a/blind/crawl-ftp.py +++ b/blind/crawl-ftp.py @@ -1,3 +1,5 @@ +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE import os import os.path import re diff --git a/blind/create-scamp-catalog.c b/blind/create-scamp-catalog.c index d9a692e97..49ce26a0b 100644 --- a/blind/create-scamp-catalog.c +++ b/blind/create-scamp-catalog.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2009 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/blind/cut-table.c b/blind/cut-table.c index 5fdb9dae0..bc17404c9 100644 --- a/blind/cut-table.c +++ b/blind/cut-table.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2010 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/blind/cut-table.h b/blind/cut-table.h index f31de6840..92545798a 100644 --- a/blind/cut-table.h +++ b/blind/cut-table.h @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2010 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #ifndef CUT_TABLE_H diff --git a/blind/diffractionFlag_check.c b/blind/diffractionFlag_check.c index a71b5117a..de9add265 100644 --- a/blind/diffractionFlag_check.c +++ b/blind/diffractionFlag_check.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include #include diff --git a/blind/dstnthing.c b/blind/dstnthing.c index aa24722ba..1ef297ce0 100644 --- a/blind/dstnthing.c +++ b/blind/dstnthing.c @@ -1,4 +1,7 @@ - +/* +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE + */ #include #include "bl.h" diff --git a/blind/engine-main.c b/blind/engine-main.c index 9a814c64e..0fe4d7add 100644 --- a/blind/engine-main.c +++ b/blind/engine-main.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2007, 2008 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ /** diff --git a/blind/engine.c b/blind/engine.c index 2cfc98a04..ffef99aaa 100644 --- a/blind/engine.c +++ b/blind/engine.c @@ -1,20 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2007, 2008 Dustin Lang, Keir Mierle and Sam Roweis. - Copyright 2010, 2011 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ /** diff --git a/blind/fits-guess-scale-main.c b/blind/fits-guess-scale-main.c index 4e783227f..5337da2b2 100644 --- a/blind/fits-guess-scale-main.c +++ b/blind/fits-guess-scale-main.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2008 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/blind/fits-guess-scale.c b/blind/fits-guess-scale.c index a188e2e94..582171467 100644 --- a/blind/fits-guess-scale.c +++ b/blind/fits-guess-scale.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006-2008 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/blind/fitscopy.c b/blind/fitscopy.c index aca1dd662..9a125d5ba 100644 --- a/blind/fitscopy.c +++ b/blind/fitscopy.c @@ -8,25 +8,9 @@ We assume it was originally written by the CFITSIO authors (primarily William D. Pence). - We (the Astrometry.net team) have modified it slightly, and we hereby place - our modifications under the GPLv2. -*/ -/* - This file is [distributed as] part of the Astrometry.net suite. - Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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. + We (the Astrometry.net team) have modified it slightly. + # Licensed under a 3-clause BSD style license - see LICENSE - You should have received a copy of the GNU General Public License - along with the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include diff --git a/blind/fitstomatlab.c b/blind/fitstomatlab.c deleted file mode 100644 index facca83a4..000000000 --- a/blind/fitstomatlab.c +++ /dev/null @@ -1,111 +0,0 @@ -/* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ - -#include -#include -#include - -#include "fitsio.h" - -int main(int argc, char *argv[]) -{ - fitsfile *fptr; /* FITS file pointer, defined in fitsio.h */ - char *val, value[1000], nullstr[]="*"; - char keyword[FLEN_KEYWORD], colname[FLEN_VALUE]; - int status = 0; /* CFITSIO status value MUST be initialized to zero! */ - int hdunum, hdutype, ncols, ii, anynul; - long jj, nrows, kk; - - if (argc != 2) { - printf("Usage: tablist filename[ext][col filter][row filter] \n"); - printf("\n"); - printf("List the contents of a FITS table \n"); - printf("\n"); - printf("Examples: \n"); - printf(" tablist tab.fits[GTI] - list the GTI extension\n"); - printf(" tablist tab.fits[1][#row < 101] - list first 100 rows\n"); - printf(" tablist tab.fits[1][col X;Y] - list X and Y cols only\n"); - printf(" tablist tab.fits[1][col -PI] - list all but the PI col\n"); - printf(" tablist tab.fits[1][col -PI][#row < 101] - combined case\n"); - printf("\n"); - printf("Display formats can be modified with the TDISPn keywords.\n"); - return(0); - } - - if (fits_open_file(&fptr, argv[1], READONLY, &status)) - goto bailout; - - if ( fits_get_hdu_num(fptr, &hdunum) == 1 ) - /* This is the primary array; try to move to the */ - /* first extension and see if it is a table */ - fits_movabs_hdu(fptr, 2, &hdutype, &status); - else - fits_get_hdu_type(fptr, &hdutype, &status); /* Get the HDU type */ - - if (hdutype == IMAGE_HDU) { - printf("Error: this program only displays tables, not images\n"); - fits_close_file(fptr, &status); - goto bailout; - } - - fits_get_num_rows(fptr, &nrows, &status); - fits_get_num_cols(fptr, &ncols, &status); - - for (ii=1; ii<=ncols; ii++) { - int typecode; - long nelems; - fits_make_keyn("TTYPE", ii, keyword, &status); - fits_read_key(fptr, TSTRING, keyword, colname, NULL, &status); - fits_get_coltype(fptr, ii, &typecode, &nelems, NULL, &status); - typecode = abs(typecode); - if (typecode == TBIT) - nelems = 1; - - // column names become variable names. - printf("%s = [ ", colname); - - // print each column, row by row (there are faster ways to do this) - for (jj=1; jj<=nrows && !status; jj++) { - for (kk=1; kk<=nelems && !status; kk++) { - /* read value as a string, regardless of intrinsic datatype */ - val = value; - if (fits_read_col_str (fptr, ii, jj, kk, 1, nullstr, - &val, &anynul, &status) ) - break; /* jump out of loop on error */ - val = value; - if (typecode != TSTRING) { - // remove leading and trailing whitespace. - char* endp; - while (*val && isspace(*val)) val++; - endp = val + strlen(val) - 1; - while (endp > val && isspace(*endp)) endp--; - endp[1] = '\0'; - } - printf("%s, ", val); - } - printf("; "); - } - printf("];\n"); - } - fits_close_file(fptr, &status); - bailout: - if (status) - fits_report_error(stderr, status); /* print any error message */ - return(status); -} - diff --git a/blind/fverify.h b/blind/fverify.h index 6b6206c40..d84555a12 100644 --- a/blind/fverify.h +++ b/blind/fverify.h @@ -1,3 +1,7 @@ +/* + This file is part of "fitsverify" and was imported from: + http://heasarc.gsfc.nasa.gov/docs/software/ftools/fitsverify/ + */ #ifndef _FVERIFY_H #define _FVERIFY_H diff --git a/blind/fvrf_data.c b/blind/fvrf_data.c index a488db248..3395f67e0 100644 --- a/blind/fvrf_data.c +++ b/blind/fvrf_data.c @@ -1,3 +1,7 @@ +/* + This file is part of "fitsverify" and was imported from: + http://heasarc.gsfc.nasa.gov/docs/software/ftools/fitsverify/ + */ #include "fverify.h" typedef struct { int nnum; diff --git a/blind/get-wcs.c b/blind/get-wcs.c index 22dfe08b1..341a72fa9 100644 --- a/blind/get-wcs.c +++ b/blind/get-wcs.c @@ -1,20 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2007 Dustin Lang, Keir Mierle and Sam Roweis. - Copyright 2010 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ /** diff --git a/blind/hpgrid.c b/blind/hpgrid.c index 56ecf24bc..ce2c80b93 100644 --- a/blind/hpgrid.c +++ b/blind/hpgrid.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ /* diff --git a/blind/hpowned.c b/blind/hpowned.c index d62d1c1ed..27d1fc3f9 100644 --- a/blind/hpowned.c +++ b/blind/hpowned.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/blind/hpquads-main.c b/blind/hpquads-main.c index 6ddf276ba..f45918c78 100644 --- a/blind/hpquads-main.c +++ b/blind/hpquads-main.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006-2009 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include @@ -39,7 +26,6 @@ #include "permutedsort.h" #include "bt.h" #include "rdlist.h" -#include "histogram.h" #include "starkd.h" #include "boilerplate.h" #include "log.h" diff --git a/blind/hpquads.c b/blind/hpquads.c index 34b2f968a..92ed1eb6e 100644 --- a/blind/hpquads.c +++ b/blind/hpquads.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006-2009 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/blind/image2xy-files.c b/blind/image2xy-files.c index 7fe33860f..44a6ba6d3 100644 --- a/blind/image2xy-files.c +++ b/blind/image2xy-files.c @@ -1,21 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006-2008 Michael Blanton, Keir Mierle, David W. Hogg, - Sam Roweis and Dustin Lang. - Copyright 2009 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/blind/image2xy-main.c b/blind/image2xy-main.c index fbae4a11b..760be2cac 100644 --- a/blind/image2xy-main.c +++ b/blind/image2xy-main.c @@ -1,21 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006-2008 Michael Blanton, Keir Mierle, David W. Hogg, - Sam Roweis and Dustin Lang. - Copyright 2009 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/blind/image2xy.py b/blind/image2xy.py index db88bac4f..8a1e5c7eb 100644 --- a/blind/image2xy.py +++ b/blind/image2xy.py @@ -1,18 +1,5 @@ # This file is part of the Astrometry.net suite. -# Copyright 2007 Keir Mierle and David W. Hogg. -# -# The Astrometry.net suite 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, version 2. -# -# The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# Licensed under a 3-clause BSD style license - see LICENSE """ NAME: diff --git a/blind/imarith.c b/blind/imarith.c index f700621c4..5756312fe 100644 --- a/blind/imarith.c +++ b/blind/imarith.c @@ -8,25 +8,10 @@ We assume it was originally written by the CFITSIO authors (primarily William D. Pence). - We (the Astrometry.net team) have modified it slightly, and we hereby place - our modifications under the GPLv2. -*/ -/* - This file is part of the Astrometry.net suite. - Copyright 2007 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. + We (the Astrometry.net team) have modified it slightly. + # Licensed under a 3-clause BSD style license - see LICENSE - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include diff --git a/blind/imcopy.c b/blind/imcopy.c index 7b5216f04..b6eb7b440 100644 --- a/blind/imcopy.c +++ b/blind/imcopy.c @@ -7,23 +7,10 @@ We assume it was originally written by the CFITSIO authors (primarily William D. Pence). -*/ -/* - This file is part of the Astrometry.net suite. - Copyright 2007 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - The Astrometry.net suite 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. + # Distributed with Astrometry.net, which is + # Licensed under a 3-clause BSD style license - see LICENSE - You should have received a copy of the GNU General Public License - along with the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include diff --git a/blind/imstat.c b/blind/imstat.c index 43afd0fc4..f8e43a97d 100644 --- a/blind/imstat.c +++ b/blind/imstat.c @@ -8,9 +8,10 @@ We assume it was originally written by the CFITSIO authors (primarily William D. Pence). - We (the Astrometry.net team) have modified it slightly, and we hereby place - our modifications under the GPLv2. -*/ + We (the Astrometry.net team) have modified it slightly. + # Licensed under a 3-clause BSD style license - see LICENSE + + */ #include #include #include "fitsio.h" diff --git a/blind/index-info.c b/blind/index-info.c index fdf168735..ffc777d86 100644 --- a/blind/index-info.c +++ b/blind/index-info.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2010 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/blind/index-stats.c b/blind/index-stats.c index bb26c2d2c..35fd25e19 100644 --- a/blind/index-stats.c +++ b/blind/index-stats.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2010 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include @@ -29,7 +16,6 @@ #include "starutil.h" #include "mathutil.h" #include "bl.h" -#include "histogram.h" #include "starkd.h" #include "boilerplate.h" #include "log.h" diff --git a/blind/index-to-table.c b/blind/index-to-table.c index 2c5b4bf6c..9a1b0e8c0 100644 --- a/blind/index-to-table.c +++ b/blind/index-to-table.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/blind/keirthing.c b/blind/keirthing.c index cb65cbc57..bc9c671cb 100644 --- a/blind/keirthing.c +++ b/blind/keirthing.c @@ -1,4 +1,7 @@ - +/* +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE + */ #include #include "bl.h" diff --git a/blind/listhead.c b/blind/listhead.c index 5d5b3f4b3..bcfe9f5dd 100644 --- a/blind/listhead.c +++ b/blind/listhead.c @@ -8,25 +8,8 @@ We assume it was originally written by the CFITSIO authors (primarily William D. Pence). - We (the Astrometry.net team) have modified it slightly, and we hereby place - our modifications under the GPLv2. -*/ -/* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + We (the Astrometry.net team) have modified it slightly. + # Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/blind/liststruc.c b/blind/liststruc.c index c15516d4b..63df27580 100644 --- a/blind/liststruc.c +++ b/blind/liststruc.c @@ -8,25 +8,8 @@ We assume it was originally written by the CFITSIO authors (primarily William D. Pence). - We (the Astrometry.net team) have modified it slightly, and we hereby place - our modifications under the GPLv2. -*/ -/* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + We (the Astrometry.net team) have modified it slightly. + # Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/blind/local-index.c b/blind/local-index.c index 127ecf2b9..c75d71585 100644 --- a/blind/local-index.c +++ b/blind/local-index.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2009 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/blind/lsfile.c b/blind/lsfile.c index 6d50a1cbd..b07bdd0f2 100644 --- a/blind/lsfile.c +++ b/blind/lsfile.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include "lsfile.h" diff --git a/blind/lsfile.h b/blind/lsfile.h index 286632644..0f7264e00 100644 --- a/blind/lsfile.h +++ b/blind/lsfile.h @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #ifndef LS_FILE_H diff --git a/blind/matchfile.c b/blind/matchfile.c index d0eef50bf..5836c43e5 100644 --- a/blind/matchfile.c +++ b/blind/matchfile.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/blind/matchobj.c b/blind/matchobj.c index 9da688e0f..4a94dc5e8 100644 --- a/blind/matchobj.c +++ b/blind/matchobj.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2010 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/blind/mctweak.py b/blind/mctweak.py index a34852b98..3bd7b18bb 100644 --- a/blind/mctweak.py +++ b/blind/mctweak.py @@ -1,3 +1,5 @@ +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE import matplotlib matplotlib.use('Agg') import pylab as plt diff --git a/blind/merge-index-main.c b/blind/merge-index-main.c index 322b49cf1..f69f8740f 100644 --- a/blind/merge-index-main.c +++ b/blind/merge-index-main.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2009 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include #include diff --git a/blind/merge-index.c b/blind/merge-index.c index 3fe593b01..b28229c2b 100644 --- a/blind/merge-index.c +++ b/blind/merge-index.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2008, 2009 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/blind/mergesolved.c b/blind/mergesolved.c index 8ef46c573..931fef411 100644 --- a/blind/mergesolved.c +++ b/blind/mergesolved.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/blind/modhead.c b/blind/modhead.c index a27d590bd..90fda417a 100644 --- a/blind/modhead.c +++ b/blind/modhead.c @@ -8,25 +8,8 @@ We assume it was originally written by the CFITSIO authors (primarily William D. Pence). - We (the Astrometry.net team) have modified it slightly, and we hereby place - our modifications under the GPLv2. -*/ -/* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + We (the Astrometry.net team) have modified it slightly. + # Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/blind/new-wcs-main.c b/blind/new-wcs-main.c index 492cea973..fe229eb0a 100644 --- a/blind/new-wcs-main.c +++ b/blind/new-wcs-main.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006-2008 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/blind/new-wcs.c b/blind/new-wcs.c index 7ccfe4e2c..56bb36250 100644 --- a/blind/new-wcs.c +++ b/blind/new-wcs.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include #include diff --git a/blind/noise.h b/blind/noise.h index 8a6c24d3c..e29f81bc4 100644 --- a/blind/noise.h +++ b/blind/noise.h @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ /* diff --git a/blind/noisesim2.py b/blind/noisesim2.py index 3c1cdc7a9..8d32640f2 100644 --- a/blind/noisesim2.py +++ b/blind/noisesim2.py @@ -1,3 +1,5 @@ +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE import sys #from numpy import array, matrix, linalg diff --git a/blind/onepixel.c b/blind/onepixel.c index c6a0a308d..07b82db21 100644 --- a/blind/onepixel.c +++ b/blind/onepixel.c @@ -1,3 +1,7 @@ +/* +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE + */ #include #include "cairoutils.h" diff --git a/blind/plot-constellations.c b/blind/plot-constellations.c index d146128a4..fc22d80c6 100644 --- a/blind/plot-constellations.c +++ b/blind/plot-constellations.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2007-2008 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/blind/plot-xy-and-quad.c b/blind/plot-xy-and-quad.c index 202a57259..222637476 100644 --- a/blind/plot-xy-and-quad.c +++ b/blind/plot-xy-and-quad.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2009 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ /* diff --git a/blind/plotann.py b/blind/plotann.py index 14e45fab8..9e1ecfd88 100755 --- a/blind/plotann.py +++ b/blind/plotann.py @@ -1,4 +1,6 @@ #! /usr/bin/env python +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE import sys import os from optparse import OptionParser diff --git a/blind/plotannotations.c b/blind/plotannotations.c index 7ca1ae38a..6429b69c9 100644 --- a/blind/plotannotations.c +++ b/blind/plotannotations.c @@ -1,20 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2007-2008 Dustin Lang, Keir Mierle and Sam Roweis. - Copyright 2009, 2010, 2012 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/blind/plotcoadd.c b/blind/plotcoadd.c index 0dbd0115e..c58bba505 100644 --- a/blind/plotcoadd.c +++ b/blind/plotcoadd.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2010 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include #include diff --git a/blind/plotcoadd.h b/blind/plotcoadd.h index 350831aa6..2416cce6f 100644 --- a/blind/plotcoadd.h +++ b/blind/plotcoadd.h @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2010 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #ifndef PLOTCOADD_H #define PLOTCOADD_H diff --git a/blind/plotfill.c b/blind/plotfill.c index 2c1709b60..ba7666943 100644 --- a/blind/plotfill.c +++ b/blind/plotfill.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2009 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include #include diff --git a/blind/plotgrid.c b/blind/plotgrid.c index 349293b96..a1829243a 100644 --- a/blind/plotgrid.c +++ b/blind/plotgrid.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2009, 2010, 2011, 2012 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include #include diff --git a/blind/plothealpix.c b/blind/plothealpix.c index 28d0c869f..fadb675d8 100644 --- a/blind/plothealpix.c +++ b/blind/plothealpix.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2009, 2010, 2011 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include #include diff --git a/blind/plotimage.c b/blind/plotimage.c index 4c99eeb14..306a42331 100644 --- a/blind/plotimage.c +++ b/blind/plotimage.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2009, 2010, 2011, 2012 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include #include diff --git a/blind/plotindex.c b/blind/plotindex.c index d4bb6407f..7d78be0ed 100644 --- a/blind/plotindex.c +++ b/blind/plotindex.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2010, 2012 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include #include diff --git a/blind/plotindex.py b/blind/plotindex.py index f529688c8..a455077f3 100644 --- a/blind/plotindex.py +++ b/blind/plotindex.py @@ -1,4 +1,6 @@ #! /usr/bin/env python +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE import os import fnmatch from astrometry.blind.plotstuff_c import * diff --git a/blind/plotmatch.c b/blind/plotmatch.c index 651d5cb16..01814f84e 100644 --- a/blind/plotmatch.c +++ b/blind/plotmatch.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2009 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include #include diff --git a/blind/plotoutline.c b/blind/plotoutline.c index 84b4a6223..ffbb18e0d 100644 --- a/blind/plotoutline.c +++ b/blind/plotoutline.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2009, 2010, 2012 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include #include diff --git a/blind/plotquad.c b/blind/plotquad.c index b84f198db..6aca026d3 100644 --- a/blind/plotquad.c +++ b/blind/plotquad.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/blind/plotradec.c b/blind/plotradec.c index 9daf1a199..b7f78d7c6 100644 --- a/blind/plotradec.c +++ b/blind/plotradec.c @@ -1,20 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. - Copyright 2009, 2010, 2012 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include #include diff --git a/blind/plotstuff-main.c b/blind/plotstuff-main.c index f3059fb51..992308b55 100644 --- a/blind/plotstuff-main.c +++ b/blind/plotstuff-main.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2009 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ diff --git a/blind/plotstuff.c b/blind/plotstuff.c index c2f98a3fc..e0f163c99 100644 --- a/blind/plotstuff.c +++ b/blind/plotstuff.c @@ -1,20 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. - Copyright 2009, 2010, 2012 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ // Avoid *nasty* problem when 'bool' gets redefined (by ppm.h) to be 4 bytes! diff --git a/blind/plotstuff.i b/blind/plotstuff.i index 5ad819efb..5118d622e 100644 --- a/blind/plotstuff.i +++ b/blind/plotstuff.i @@ -1,3 +1,7 @@ +/* +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE + */ %module(package="astrometry.blind") plotstuff_c %include diff --git a/blind/plotstuff.py b/blind/plotstuff.py index 21fb63df5..bc2e6f95c 100644 --- a/blind/plotstuff.py +++ b/blind/plotstuff.py @@ -1,3 +1,5 @@ +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE from plotstuff_c import * # Could consider using swig's "addmethods" mechanism to create this "class" rep. diff --git a/blind/plotxxx.c b/blind/plotxxx.c index 5296d50de..cc2d125d4 100644 --- a/blind/plotxxx.c +++ b/blind/plotxxx.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2009 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include #include diff --git a/blind/plotxxx.h b/blind/plotxxx.h index 05e3c4599..3d1421b4e 100644 --- a/blind/plotxxx.h +++ b/blind/plotxxx.h @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2009 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #ifndef PLOTXXX_H #define PLOTXXX_H diff --git a/blind/plotxy-main.c b/blind/plotxy-main.c index e8dc5da10..59ec7cbd5 100644 --- a/blind/plotxy-main.c +++ b/blind/plotxy-main.c @@ -1,20 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. - Copyright 2009, 2012 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/blind/plotxy.c b/blind/plotxy.c index 1d1ea411a..305782a42 100644 --- a/blind/plotxy.c +++ b/blind/plotxy.c @@ -1,20 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. - Copyright 2009, 2010, 2012 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include #include diff --git a/blind/pnpoly.h b/blind/pnpoly.h index 128068c66..ab7663f00 100644 --- a/blind/pnpoly.h +++ b/blind/pnpoly.h @@ -1,5 +1,5 @@ /* - See the file "pnpoly.c" for copyright information. + See the file "pnpoly.c" for copyright and license information. */ /* diff --git a/blind/pquad.h b/blind/pquad.h index 9c9356a4f..d8b0adde0 100644 --- a/blind/pquad.h +++ b/blind/pquad.h @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2007 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #ifndef PQUAD_H diff --git a/blind/printsolved.c b/blind/printsolved.c index b998e40c8..8a82b2e18 100644 --- a/blind/printsolved.c +++ b/blind/printsolved.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/blind/quad-builder.c b/blind/quad-builder.c index d22639732..793ccc807 100644 --- a/blind/quad-builder.c +++ b/blind/quad-builder.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2009, 2012 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/blind/quad-utils.c b/blind/quad-utils.c index b49b3fcc7..9d3b05c42 100644 --- a/blind/quad-utils.c +++ b/blind/quad-utils.c @@ -1,20 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006-2009 Dustin Lang, Keir Mierle and Sam Roweis. - Copyright 2012 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/blind/quadcenters.c b/blind/quadcenters.c index 3d03f5205..372416b9c 100644 --- a/blind/quadcenters.c +++ b/blind/quadcenters.c @@ -1,20 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2007 Dustin Lang, Keir Mierle and Sam Roweis. - Copyright 2009 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/blind/quadidx.c b/blind/quadidx.c index 6b89bf8cb..9d2dc0a97 100644 --- a/blind/quadidx.c +++ b/blind/quadidx.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006-2008 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ /** diff --git a/blind/quadscales.c b/blind/quadscales.c index c2b58269a..0105ce47a 100644 --- a/blind/quadscales.c +++ b/blind/quadscales.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/blind/quadsperstar.c b/blind/quadsperstar.c index 6e1a99551..c8479d700 100644 --- a/blind/quadsperstar.c +++ b/blind/quadsperstar.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/blind/randcat.c b/blind/randcat.c index 8e982cb68..aaf956499 100644 --- a/blind/randcat.c +++ b/blind/randcat.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include "starutil.h" diff --git a/blind/rdls2hpls.c b/blind/rdls2hpls.c index 448b50ac9..f3fada2ad 100644 --- a/blind/rdls2hpls.c +++ b/blind/rdls2hpls.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/blind/rdlstohealpix.c b/blind/rdlstohealpix.c index 3fc646d1d..19ce8fe0d 100644 --- a/blind/rdlstohealpix.c +++ b/blind/rdlstohealpix.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/blind/resort-xylist-main.c b/blind/resort-xylist-main.c index 88791ea0e..eab5a412a 100644 --- a/blind/resort-xylist-main.c +++ b/blind/resort-xylist-main.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/blind/resort-xylist.c b/blind/resort-xylist.c index 864b3884c..743fe96a7 100644 --- a/blind/resort-xylist.c +++ b/blind/resort-xylist.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/blind/setsolved.c b/blind/setsolved.c index 5c1573a1f..1abb334ea 100644 --- a/blind/setsolved.c +++ b/blind/setsolved.c @@ -1,3 +1,7 @@ +/* +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE + */ #include #include #include "solvedfile.h" diff --git a/blind/setup-blind.py b/blind/setup-blind.py index 66567a738..62861e40d 100644 --- a/blind/setup-blind.py +++ b/blind/setup-blind.py @@ -1,3 +1,5 @@ +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE import os import sys # add .. to pythonpath diff --git a/blind/setup.py b/blind/setup.py index 60d0f3d39..1c7edcbc8 100644 --- a/blind/setup.py +++ b/blind/setup.py @@ -1,3 +1,5 @@ +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE import os import sys # add .. to pythonpath diff --git a/blind/solve-field.c b/blind/solve-field.c index c7436ca29..8f266f338 100644 --- a/blind/solve-field.c +++ b/blind/solve-field.c @@ -1,20 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2007-2009 Dustin Lang, Keir Mierle and Sam Roweis. - Copyright 2010, 2011, 2012 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ diff --git a/blind/solvedclient.c b/blind/solvedclient.c index a6bcf566f..d8bc1e15a 100644 --- a/blind/solvedclient.c +++ b/blind/solvedclient.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/blind/solvedfile.c b/blind/solvedfile.c index ebc967a37..a3d74aff8 100644 --- a/blind/solvedfile.c +++ b/blind/solvedfile.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/blind/solvedserver.c b/blind/solvedserver.c index 20d9331c5..404554eef 100644 --- a/blind/solvedserver.c +++ b/blind/solvedserver.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/blind/solver.c b/blind/solver.c index 902aff5c7..97b07a124 100644 --- a/blind/solver.c +++ b/blind/solver.c @@ -1,20 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. - Copyright 2008-2010 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/blind/spoof.py b/blind/spoof.py index 0f4ef80cf..3a89253d3 100644 --- a/blind/spoof.py +++ b/blind/spoof.py @@ -1,3 +1,5 @@ +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE try: import pyfits except ImportError: diff --git a/blind/startree.c b/blind/startree.c index da1c89653..1db0b96a3 100644 --- a/blind/startree.c +++ b/blind/startree.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ /** diff --git a/blind/startree2-main.c b/blind/startree2-main.c index 8b01c1b89..bed111b36 100644 --- a/blind/startree2-main.c +++ b/blind/startree2-main.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2009 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/blind/startree2.c b/blind/startree2.c index 65522e696..c7adc4e96 100644 --- a/blind/startree2.c +++ b/blind/startree2.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2009 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include "startree2.h" diff --git a/blind/startree2.h b/blind/startree2.h index 2b07823e2..7c9dbc234 100644 --- a/blind/startree2.h +++ b/blind/startree2.h @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2009 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #ifndef STARTREE2_H diff --git a/blind/startree2rdls.c b/blind/startree2rdls.c index 796422baf..f35c48d92 100644 --- a/blind/startree2rdls.c +++ b/blind/startree2rdls.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2007 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/blind/subwcs.c b/blind/subwcs.c index d8cd3f1e2..2090540c8 100644 --- a/blind/subwcs.c +++ b/blind/subwcs.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2009 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/blind/summarize-jobs.py b/blind/summarize-jobs.py index 574b897ec..2cb101642 100644 --- a/blind/summarize-jobs.py +++ b/blind/summarize-jobs.py @@ -1,3 +1,6 @@ +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE + #import sqlite3 #import commands import os diff --git a/blind/tablist.c b/blind/tablist.c index fd2a73c1a..df3840700 100644 --- a/blind/tablist.c +++ b/blind/tablist.c @@ -8,25 +8,8 @@ We assume it was originally written by the CFITSIO authors (primarily William D. Pence). - We (the Astrometry.net team) have modified it slightly, and we hereby place - our modifications under the GPLv2. -*/ -/* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + We (the Astrometry.net team) have modified it slightly. + # Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/blind/tabmerge.c b/blind/tabmerge.c index d436ee459..61feacb3e 100644 --- a/blind/tabmerge.c +++ b/blind/tabmerge.c @@ -8,25 +8,8 @@ We assume it was originally written by the CFITSIO authors (primarily William D. Pence). - We (the Astrometry.net team) have modified it slightly, and we hereby place - our modifications under the GPLv2. -*/ -/* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + We (the Astrometry.net team) have modified it slightly. + # Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/blind/test-solver-2.c b/blind/test-solver-2.c index 8efe3a444..2cc135b04 100644 --- a/blind/test-solver-2.c +++ b/blind/test-solver-2.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2007-2010 Dustin Lang - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/blind/test-solver.c b/blind/test-solver.c index 6f77ef3eb..b1957bb96 100644 --- a/blind/test-solver.c +++ b/blind/test-solver.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2007 Dustin Lang - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/blind/test_blindutils.c b/blind/test_blindutils.c index cd2db93fa..99d1a2626 100644 --- a/blind/test_blindutils.c +++ b/blind/test_blindutils.c @@ -1,3 +1,7 @@ +/* +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE + */ #include #include diff --git a/blind/test_codefile.c b/blind/test_codefile.c index f6e9913e6..48b4e3b69 100644 --- a/blind/test_codefile.c +++ b/blind/test_codefile.c @@ -1,3 +1,7 @@ +/* +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE + */ #include #include "fitsbin.h" diff --git a/blind/test_matchfile.c b/blind/test_matchfile.c index 8d202cf65..08f2b0efe 100644 --- a/blind/test_matchfile.c +++ b/blind/test_matchfile.c @@ -1,3 +1,7 @@ +/* +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE + */ #include #include #include diff --git a/blind/test_multiindex2.c b/blind/test_multiindex2.c index 3dd0aafe8..89545e590 100644 --- a/blind/test_multiindex2.c +++ b/blind/test_multiindex2.c @@ -1,4 +1,7 @@ - +/* +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE + */ #include #include "cutest.h" diff --git a/blind/test_plotstuff.c b/blind/test_plotstuff.c index c4d63f145..f582f97be 100644 --- a/blind/test_plotstuff.c +++ b/blind/test_plotstuff.c @@ -1,3 +1,7 @@ +/* +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE + */ #include #include #include diff --git a/blind/test_plotstuff.py b/blind/test_plotstuff.py index d1d6effc1..b6552d2c0 100644 --- a/blind/test_plotstuff.py +++ b/blind/test_plotstuff.py @@ -1,3 +1,5 @@ +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE import matplotlib if __name__ == '__main__': matplotlib.use('Agg') diff --git a/blind/test_plotstuff2.py b/blind/test_plotstuff2.py index 77db85bdd..dacf98557 100644 --- a/blind/test_plotstuff2.py +++ b/blind/test_plotstuff2.py @@ -1,3 +1,5 @@ +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE import matplotlib if __name__ == '__main__': matplotlib.use('Agg') diff --git a/blind/test_resort-xylist.c b/blind/test_resort-xylist.c index 00b30dd21..3c7cba930 100644 --- a/blind/test_resort-xylist.c +++ b/blind/test_resort-xylist.c @@ -1,3 +1,7 @@ +/* +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE + */ #include #include #include diff --git a/blind/test_tweak.c b/blind/test_tweak.c index 121d40ceb..f8fb0283b 100644 --- a/blind/test_tweak.c +++ b/blind/test_tweak.c @@ -1,3 +1,7 @@ +/* +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE + */ #include #include #include diff --git a/blind/test_tweak_plots.py b/blind/test_tweak_plots.py index 63a98dda8..1c083a9a5 100644 --- a/blind/test_tweak_plots.py +++ b/blind/test_tweak_plots.py @@ -1,3 +1,5 @@ +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE import matplotlib matplotlib.use('Agg') import os.path diff --git a/blind/threadtest.c b/blind/threadtest.c index 7d9a941c7..862698d12 100644 --- a/blind/threadtest.c +++ b/blind/threadtest.c @@ -1,4 +1,7 @@ - +/* +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE + */ #include #include "engine.h" diff --git a/blind/tweak-main.c b/blind/tweak-main.c index 8d93d1633..ae3508516 100644 --- a/blind/tweak-main.c +++ b/blind/tweak-main.c @@ -1,20 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006-2008 Dustin Lang, Keir Mierle and Sam Roweis. - Copyright 2009 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include #include diff --git a/blind/tweak.c b/blind/tweak.c index d2d379dfc..63f861f79 100644 --- a/blind/tweak.c +++ b/blind/tweak.c @@ -1,20 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Keir Mierle, David W. Hogg, Sam Roweis and Dustin Lang. - Copyright 2010 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/blind/tweak2.c b/blind/tweak2.c index bab102ac7..74f299141 100644 --- a/blind/tweak2.c +++ b/blind/tweak2.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2010, 2012 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include #include diff --git a/blind/uniformize-catalog-main.c b/blind/uniformize-catalog-main.c index 241102bd1..0cbe72aa5 100644 --- a/blind/uniformize-catalog-main.c +++ b/blind/uniformize-catalog-main.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2009 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/blind/uniformize-catalog.c b/blind/uniformize-catalog.c index 765d7d276..51447d395 100644 --- a/blind/uniformize-catalog.c +++ b/blind/uniformize-catalog.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2009, 2011, 2012 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/blind/unpermute-quads-main.c b/blind/unpermute-quads-main.c index efadc8b8c..7a32e0ffb 100644 --- a/blind/unpermute-quads-main.c +++ b/blind/unpermute-quads-main.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include #include diff --git a/blind/unpermute-quads.c b/blind/unpermute-quads.c index 913856c60..c315a3773 100644 --- a/blind/unpermute-quads.c +++ b/blind/unpermute-quads.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/blind/unpermute-stars-main.c b/blind/unpermute-stars-main.c index 7bd414eaf..dcb04dc15 100644 --- a/blind/unpermute-stars-main.c +++ b/blind/unpermute-stars-main.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006-2008 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/blind/unpermute-stars.c b/blind/unpermute-stars.c index 096ac8183..8a97dc2da 100644 --- a/blind/unpermute-stars.c +++ b/blind/unpermute-stars.c @@ -1,20 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006-2008 Dustin Lang, Keir Mierle and Sam Roweis. - Copyright 2012 Dustin Lang - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/blind/ver.py b/blind/ver.py index ed6ae5e86..f57b61bdd 100644 --- a/blind/ver.py +++ b/blind/ver.py @@ -1,3 +1,5 @@ +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE import math try: import pyfits diff --git a/blind/verify-main.c b/blind/verify-main.c index 4666e45b7..70695a9bb 100644 --- a/blind/verify-main.c +++ b/blind/verify-main.c @@ -1,20 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006-2008 Dustin Lang, Keir Mierle and Sam Roweis. - Copyright 2009 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include #include diff --git a/blind/verify-paths.c b/blind/verify-paths.c index ed4c8f18e..df4a88f71 100644 --- a/blind/verify-paths.c +++ b/blind/verify-paths.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2009 Dustin Lang, David W. Hogg. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ /** diff --git a/blind/verify.c b/blind/verify.c index 33413247a..433fbf43b 100644 --- a/blind/verify.c +++ b/blind/verify.c @@ -1,20 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. - Copyright 2009, 2010 Dustin Lang, David W. Hogg. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/blind/verify2.c b/blind/verify2.c index 59cd1b520..8603d353c 100644 --- a/blind/verify2.c +++ b/blind/verify2.c @@ -1,20 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. - Copyright 2009 Dustin Lang, David W. Hogg. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/blind/verify2.h b/blind/verify2.h index 734c27dc9..340c6524a 100644 --- a/blind/verify2.h +++ b/blind/verify2.h @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #ifndef VERIFY2_H diff --git a/blind/wcs-grab.c b/blind/wcs-grab.c index b4fedc804..016546597 100644 --- a/blind/wcs-grab.c +++ b/blind/wcs-grab.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2009 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/blind/whynot.c b/blind/whynot.c index 7eec2464b..1d4f7ae08 100644 --- a/blind/whynot.c +++ b/blind/whynot.c @@ -1,20 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006-2008 Dustin Lang, Keir Mierle and Sam Roweis. - Copyright 2009, 2010 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/blind/whynot.py b/blind/whynot.py index 8821f4690..2d8324b31 100755 --- a/blind/whynot.py +++ b/blind/whynot.py @@ -1,4 +1,6 @@ #! /usr/bin/env python +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE from astrometry.util.index import * from astrometry.util.sip import * diff --git a/catalogs/2mass-fits.c b/catalogs/2mass-fits.c index 370270524..0d2bc4380 100644 --- a/catalogs/2mass-fits.c +++ b/catalogs/2mass-fits.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006-2008 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/catalogs/2mass.c b/catalogs/2mass.c index fc473a5e2..b7864cefc 100644 --- a/catalogs/2mass.c +++ b/catalogs/2mass.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include #include diff --git a/catalogs/2masstofits.c b/catalogs/2masstofits.c index a2dec81b3..660e123c5 100644 --- a/catalogs/2masstofits.c +++ b/catalogs/2masstofits.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006-2008 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include #include diff --git a/catalogs/Makefile b/catalogs/Makefile index 2b4da6c82..c0adb7a43 100644 --- a/catalogs/Makefile +++ b/catalogs/Makefile @@ -1,18 +1,5 @@ # This file is part of the Astrometry.net suite. -# Copyright 2013 Dustin Lang -# -# The Astrometry.net suite 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, version 2. -# -# The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# Licensed under a 3-clause BSD style license - see LICENSE BASEDIR := .. COMMON := $(BASEDIR)/util diff --git a/catalogs/brightstars-to-fits.py b/catalogs/brightstars-to-fits.py index 01a08a0f2..2a9ab29d2 100644 --- a/catalogs/brightstars-to-fits.py +++ b/catalogs/brightstars-to-fits.py @@ -1,3 +1,5 @@ +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE import simplejson import re diff --git a/catalogs/brightstars.c b/catalogs/brightstars.c index b217eaabb..202377546 100644 --- a/catalogs/brightstars.c +++ b/catalogs/brightstars.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2007 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/catalogs/build-hd-tree.c b/catalogs/build-hd-tree.c index a45426163..4ab87fa20 100644 --- a/catalogs/build-hd-tree.c +++ b/catalogs/build-hd-tree.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2008 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ /** diff --git a/catalogs/constellations.c b/catalogs/constellations.c index 570f70276..334336ea1 100644 --- a/catalogs/constellations.c +++ b/catalogs/constellations.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2007 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/catalogs/constellations.py b/catalogs/constellations.py index 8cef2ecb3..fb85ab5dc 100644 --- a/catalogs/constellations.py +++ b/catalogs/constellations.py @@ -1,3 +1,5 @@ +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE shortnames = [ "Aql","And","Scl","Ara","Lib","Cet","Ari","Sct","Pyx","Boo","Cae","Cha","Cnc","Cap","Car","Cas","Cen","Cep","Com","Cvn","Aur","Col","Cir","Crt","CrA","CrB","Crv","Cru","Cyg","Del","Dor","Dra","Nor","Eri","Sge","For","Gem","Cam","CMa","UMa","Gru","Her","Hor","Hya","Hyi","Ind","Lac","Mon","Lep","Leo","Lup","Lyn","Lyr","Ant","Mic","Mus","Oct","Aps","Oph","Ori","Pav","Peg","Pic","Per","Equ","CMi","LMi","Vul","UMi","Phe","Psc","PsA","Vol","Pup","Ret","Sgr","Sco","Ser","Sex","Men","Tau","Tel","Tuc","Tri","Tra","Aqr","Vir","Vel" ] diff --git a/catalogs/convert-uzc.py b/catalogs/convert-uzc.py index c5d9f1511..5c2b2e060 100644 --- a/catalogs/convert-uzc.py +++ b/catalogs/convert-uzc.py @@ -1,3 +1,5 @@ +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE from astrometry.util.starutil_numpy import * from astrometry.util.fits import * diff --git a/catalogs/grab-stellarium-constellations.c b/catalogs/grab-stellarium-constellations.c index ab5ff274a..c8d9ce9c5 100644 --- a/catalogs/grab-stellarium-constellations.c +++ b/catalogs/grab-stellarium-constellations.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2007 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/catalogs/hd.c b/catalogs/hd.c index 35eefdcb9..2a74ebe5d 100644 --- a/catalogs/hd.c +++ b/catalogs/hd.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2008, 200,, 2012 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/catalogs/ngc2000.c b/catalogs/ngc2000.c index f36db02b2..9c0682b68 100644 --- a/catalogs/ngc2000.c +++ b/catalogs/ngc2000.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2007 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/catalogs/ngc2000tofits.py b/catalogs/ngc2000tofits.py index 8e099b6e4..dba0a470d 100644 --- a/catalogs/ngc2000tofits.py +++ b/catalogs/ngc2000tofits.py @@ -1,3 +1,5 @@ +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE try: import pyfits except ImportError: diff --git a/catalogs/ngcic-accurate.c b/catalogs/ngcic-accurate.c index f867c50c7..aa56c7c3f 100644 --- a/catalogs/ngcic-accurate.c +++ b/catalogs/ngcic-accurate.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2007 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/catalogs/nomad-fits.c b/catalogs/nomad-fits.c index 082029689..36e0c998f 100644 --- a/catalogs/nomad-fits.c +++ b/catalogs/nomad-fits.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/catalogs/nomad.c b/catalogs/nomad.c index 32b8e03ae..8b2ecf466 100644 --- a/catalogs/nomad.c +++ b/catalogs/nomad.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/catalogs/nomadtofits.c b/catalogs/nomadtofits.c index c8dc36e7e..c9ec143bd 100644 --- a/catalogs/nomadtofits.c +++ b/catalogs/nomadtofits.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/catalogs/parse-ngc2000-py.awk b/catalogs/parse-ngc2000-py.awk index f768b6ea3..cb9d7dbc3 100644 --- a/catalogs/parse-ngc2000-py.awk +++ b/catalogs/parse-ngc2000-py.awk @@ -1,3 +1,5 @@ +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE { # Is it part of NGC or IC? ic = substr($0, 1, 1); diff --git a/catalogs/parse-ngc2000.awk b/catalogs/parse-ngc2000.awk index 86c6ebd66..4e3629551 100644 --- a/catalogs/parse-ngc2000.awk +++ b/catalogs/parse-ngc2000.awk @@ -1,3 +1,5 @@ +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE { # Is it part of NGC or IC? ic = substr($0, 1, 1); diff --git a/catalogs/parse-ngc2000names.awk b/catalogs/parse-ngc2000names.awk index 6ca57d75a..5655ef8dd 100644 --- a/catalogs/parse-ngc2000names.awk +++ b/catalogs/parse-ngc2000names.awk @@ -1,3 +1,5 @@ +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE { # Common name: eliminate multiple spaces namepadded = substr($0, 1, 35); diff --git a/catalogs/parse-ngcic-accurate-py.awk b/catalogs/parse-ngcic-accurate-py.awk index 565ddddf8..c8126be2e 100644 --- a/catalogs/parse-ngcic-accurate-py.awk +++ b/catalogs/parse-ngcic-accurate-py.awk @@ -1,3 +1,5 @@ +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE # Parse NGC/IC accurate positions from http://www.ngcic.org/corwin/default.htm { # NGC or IC? diff --git a/catalogs/parse-ngcic-accurate.awk b/catalogs/parse-ngcic-accurate.awk index 4e9d490c2..e1c48c0f1 100644 --- a/catalogs/parse-ngcic-accurate.awk +++ b/catalogs/parse-ngcic-accurate.awk @@ -1,3 +1,5 @@ +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE # Parse NGC/IC accurate positions from http://www.ngcic.org/corwin/default.htm { # NGC or IC? diff --git a/catalogs/read_nomad.c b/catalogs/read_nomad.c index 383747357..6c1eded00 100644 --- a/catalogs/read_nomad.c +++ b/catalogs/read_nomad.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ /* diff --git a/catalogs/test_2mass.c b/catalogs/test_2mass.c index 4a74e6afe..16ae88b01 100644 --- a/catalogs/test_2mass.c +++ b/catalogs/test_2mass.c @@ -1,3 +1,7 @@ +/* +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE + */ #include #include #include diff --git a/catalogs/test_boundaries.c b/catalogs/test_boundaries.c index 5e3dbee41..53c41a20a 100644 --- a/catalogs/test_boundaries.c +++ b/catalogs/test_boundaries.c @@ -1,3 +1,7 @@ +/* +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE + */ #include #include #include diff --git a/catalogs/test_hd.c b/catalogs/test_hd.c index 66e56906b..552268c0a 100644 --- a/catalogs/test_hd.c +++ b/catalogs/test_hd.c @@ -1,3 +1,7 @@ +/* +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE + */ #include #include #include diff --git a/catalogs/test_nomad.c b/catalogs/test_nomad.c index 1d71aa61a..fd3aa6f4e 100644 --- a/catalogs/test_nomad.c +++ b/catalogs/test_nomad.c @@ -1,3 +1,7 @@ +/* +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE + */ #include #include #include diff --git a/catalogs/test_tycho2.c b/catalogs/test_tycho2.c index 053790d6b..8993fb903 100644 --- a/catalogs/test_tycho2.c +++ b/catalogs/test_tycho2.c @@ -1,3 +1,7 @@ +/* +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE + */ #include #include #include diff --git a/catalogs/test_usnob.c b/catalogs/test_usnob.c index 8d6f8d614..34817d483 100644 --- a/catalogs/test_usnob.c +++ b/catalogs/test_usnob.c @@ -1,3 +1,7 @@ +/* +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE + */ #include #include #include diff --git a/catalogs/tycho2-fits.c b/catalogs/tycho2-fits.c index e0a1b51f0..b6d2f0e95 100644 --- a/catalogs/tycho2-fits.c +++ b/catalogs/tycho2-fits.c @@ -1,20 +1,7 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006-2008 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE + */ #include #include diff --git a/catalogs/tycho2.c b/catalogs/tycho2.c index d3e2b21cf..6a3169e30 100644 --- a/catalogs/tycho2.c +++ b/catalogs/tycho2.c @@ -1,20 +1,7 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE + */ #include #include diff --git a/catalogs/tycho2tofits.c b/catalogs/tycho2tofits.c index 70a750f55..bcb93173b 100644 --- a/catalogs/tycho2tofits.c +++ b/catalogs/tycho2tofits.c @@ -1,20 +1,7 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE + */ #include #include diff --git a/catalogs/tycho2tostellarium.c b/catalogs/tycho2tostellarium.c index 11d7ba494..9f154a325 100644 --- a/catalogs/tycho2tostellarium.c +++ b/catalogs/tycho2tostellarium.c @@ -1,20 +1,7 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE + */ #include #include diff --git a/catalogs/ucac3-fits.c b/catalogs/ucac3-fits.c index c79fc000c..343429988 100644 --- a/catalogs/ucac3-fits.c +++ b/catalogs/ucac3-fits.c @@ -1,20 +1,7 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2011 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE + */ #include #include diff --git a/catalogs/ucac3-fits.h b/catalogs/ucac3-fits.h index ac7e21130..ad8ee7d92 100644 --- a/catalogs/ucac3-fits.h +++ b/catalogs/ucac3-fits.h @@ -1,20 +1,7 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2011 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE + */ #ifndef UCAC3_FITS_H #define UCAC3_FITS_H diff --git a/catalogs/ucac3.c b/catalogs/ucac3.c index 5a9515496..ba4c0905c 100644 --- a/catalogs/ucac3.c +++ b/catalogs/ucac3.c @@ -1,20 +1,7 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2011 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE + */ #include #include diff --git a/catalogs/ucac3tofits.c b/catalogs/ucac3tofits.c index 79c4d4378..1b619a82b 100644 --- a/catalogs/ucac3tofits.c +++ b/catalogs/ucac3tofits.c @@ -1,20 +1,7 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2011 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE + */ #include #include diff --git a/catalogs/usnob-fits.c b/catalogs/usnob-fits.c index 94572fead..7ea07f3c5 100644 --- a/catalogs/usnob-fits.c +++ b/catalogs/usnob-fits.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/catalogs/usnob-scamp-catalog.c b/catalogs/usnob-scamp-catalog.c index 0c0c18c71..a15304be2 100644 --- a/catalogs/usnob-scamp-catalog.c +++ b/catalogs/usnob-scamp-catalog.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2008 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/catalogs/usnob.c b/catalogs/usnob.c index 5b1e0af00..8f03aa6f1 100644 --- a/catalogs/usnob.c +++ b/catalogs/usnob.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/catalogs/usnobtofits.c b/catalogs/usnobtofits.c index 9ab820c69..cc81cc163 100644 --- a/catalogs/usnobtofits.c +++ b/catalogs/usnobtofits.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/include/astrometry/2mass-fits.h b/include/astrometry/2mass-fits.h index fb4504e9e..2d57ccf32 100644 --- a/include/astrometry/2mass-fits.h +++ b/include/astrometry/2mass-fits.h @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006-2008 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #ifndef TWOMASS_FITS_H diff --git a/include/astrometry/2mass.h b/include/astrometry/2mass.h index 539993b17..b8dc991fd 100644 --- a/include/astrometry/2mass.h +++ b/include/astrometry/2mass.h @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #ifndef TWOMASS_H diff --git a/include/astrometry/allquads.h b/include/astrometry/allquads.h index 7b2c80533..a716a5fc0 100644 --- a/include/astrometry/allquads.h +++ b/include/astrometry/allquads.h @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2009 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #ifndef ALLQUADS_H diff --git a/include/astrometry/an-bool.h b/include/astrometry/an-bool.h index f8ef39ccd..70de133a3 100644 --- a/include/astrometry/an-bool.h +++ b/include/astrometry/an-bool.h @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #ifndef AN_BOOL_H diff --git a/include/astrometry/an-endian.h b/include/astrometry/an-endian.h index 880c887ca..8e0ce33cb 100644 --- a/include/astrometry/an-endian.h +++ b/include/astrometry/an-endian.h @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2008, 2012 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #ifndef AN_ENDIAN_H #define AN_ENDIAN_H diff --git a/include/astrometry/an-opts.h b/include/astrometry/an-opts.h index 03e14e9c2..e1550b07d 100644 --- a/include/astrometry/an-opts.h +++ b/include/astrometry/an-opts.h @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2008 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #ifndef AN_OPTS_H diff --git a/include/astrometry/an-thread-pthreads.h b/include/astrometry/an-thread-pthreads.h index 5f85df828..ec53ef2af 100644 --- a/include/astrometry/an-thread-pthreads.h +++ b/include/astrometry/an-thread-pthreads.h @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2009 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #ifndef AN_THREAD_PTHREADS_H diff --git a/include/astrometry/an-thread.h b/include/astrometry/an-thread.h index 160a956ec..942b0568f 100644 --- a/include/astrometry/an-thread.h +++ b/include/astrometry/an-thread.h @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2009 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #ifndef AN_THREAD_H diff --git a/include/astrometry/anwcs.h b/include/astrometry/anwcs.h index ba7eb2159..62c0bfb92 100644 --- a/include/astrometry/anwcs.h +++ b/include/astrometry/anwcs.h @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2010 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #ifndef ANWCSLIB_H diff --git a/include/astrometry/augment-xylist.h b/include/astrometry/augment-xylist.h index bf7406478..0c5e61936 100644 --- a/include/astrometry/augment-xylist.h +++ b/include/astrometry/augment-xylist.h @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2008, 2009, 2010, 2011 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #ifndef AUGMENT_XYLIST_H diff --git a/include/astrometry/axyfile.h b/include/astrometry/axyfile.h index 67b1b36ca..31f122466 100644 --- a/include/astrometry/axyfile.h +++ b/include/astrometry/axyfile.h @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2009 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #ifndef AXYFILE_H diff --git a/include/astrometry/bl-nl.h b/include/astrometry/bl-nl.h index 434ed9020..fea9f714e 100644 --- a/include/astrometry/bl-nl.h +++ b/include/astrometry/bl-nl.h @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2009 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ /** diff --git a/include/astrometry/bl-nl.inc b/include/astrometry/bl-nl.inc index b9067e130..fcd5dc5ff 100644 --- a/include/astrometry/bl-nl.inc +++ b/include/astrometry/bl-nl.inc @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2009 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include "astrometry/bl-nl.ph" diff --git a/include/astrometry/bl-nl.ph b/include/astrometry/bl-nl.ph index d7cbfddb7..c0d65cc78 100644 --- a/include/astrometry/bl-nl.ph +++ b/include/astrometry/bl-nl.ph @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2009 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ //#define NODE_NUMDATA(node) ((number*)NODE_DATA(node)) diff --git a/include/astrometry/bl-sort.h b/include/astrometry/bl-sort.h index dd5e63b3c..0075de457 100644 --- a/include/astrometry/bl-sort.h +++ b/include/astrometry/bl-sort.h @@ -1,20 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. - Copyright 2014 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ /* diff --git a/include/astrometry/bl.h b/include/astrometry/bl.h index 9d46c207c..a0e013e47 100644 --- a/include/astrometry/bl.h +++ b/include/astrometry/bl.h @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ /** diff --git a/include/astrometry/bl.inc b/include/astrometry/bl.inc index 378a8fb37..42ec8eff3 100644 --- a/include/astrometry/bl.inc +++ b/include/astrometry/bl.inc @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006-2009 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/include/astrometry/bl.ph b/include/astrometry/bl.ph index fe2b1db25..f1c275286 100644 --- a/include/astrometry/bl.ph +++ b/include/astrometry/bl.ph @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006-2009 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ /// Private header file shared between bl.inc and bl.c diff --git a/include/astrometry/blind.h b/include/astrometry/blind.h index e475cdff6..531a18652 100644 --- a/include/astrometry/blind.h +++ b/include/astrometry/blind.h @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2007 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #ifndef BLIND_H diff --git a/include/astrometry/blindutils.h b/include/astrometry/blindutils.h index a4b58389a..9b53719f4 100644 --- a/include/astrometry/blindutils.h +++ b/include/astrometry/blindutils.h @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2007 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #ifndef SCRIPTUTILS_H diff --git a/include/astrometry/brightstars.h b/include/astrometry/brightstars.h index dafddec2d..ba9ca0f5b 100644 --- a/include/astrometry/brightstars.h +++ b/include/astrometry/brightstars.h @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2007 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #ifndef BRIGHTSTARS_H diff --git a/include/astrometry/bt.h b/include/astrometry/bt.h index 0e983b82e..08d3f6164 100644 --- a/include/astrometry/bt.h +++ b/include/astrometry/bt.h @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #ifndef BT_H diff --git a/include/astrometry/build-index.h b/include/astrometry/build-index.h index c2867214f..b4801a679 100644 --- a/include/astrometry/build-index.h +++ b/include/astrometry/build-index.h @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2009 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #ifndef BUILD_INDEX_H #define BUILD_INDEX_H diff --git a/include/astrometry/cairoutils.h b/include/astrometry/cairoutils.h index c86ec79be..78d35abed 100644 --- a/include/astrometry/cairoutils.h +++ b/include/astrometry/cairoutils.h @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2007 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #ifndef CAIRO_UTILS_H diff --git a/include/astrometry/catalog.h b/include/astrometry/catalog.h index c87a6aeca..e66d2f59f 100644 --- a/include/astrometry/catalog.h +++ b/include/astrometry/catalog.h @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #ifndef CATUTILS_H diff --git a/include/astrometry/coadd.h b/include/astrometry/coadd.h index 7fcbd06db..824639b48 100644 --- a/include/astrometry/coadd.h +++ b/include/astrometry/coadd.h @@ -1,3 +1,7 @@ +/* +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE + */ #include "astrometry/anwcs.h" #include "astrometry/resample.h" diff --git a/include/astrometry/codefile.h b/include/astrometry/codefile.h index 903965dee..d4d4a390d 100644 --- a/include/astrometry/codefile.h +++ b/include/astrometry/codefile.h @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #ifndef CODEFILE_H_ diff --git a/include/astrometry/codekd.h b/include/astrometry/codekd.h index 9239bb336..e46fe6517 100644 --- a/include/astrometry/codekd.h +++ b/include/astrometry/codekd.h @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #ifndef CODE_KD_H diff --git a/include/astrometry/codetree.h b/include/astrometry/codetree.h index 340dc3a2d..912c616f9 100644 --- a/include/astrometry/codetree.h +++ b/include/astrometry/codetree.h @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2009 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #ifndef CODETREE_H diff --git a/include/astrometry/constellation-boundaries.h b/include/astrometry/constellation-boundaries.h index d0a460203..7ae771322 100644 --- a/include/astrometry/constellation-boundaries.h +++ b/include/astrometry/constellation-boundaries.h @@ -1,3 +1,7 @@ +/* +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE + */ #ifndef CONSTELLATION_BOUNDARIES_H #define CONSTELLATION_BOUNDARIES_H diff --git a/include/astrometry/constellations.h b/include/astrometry/constellations.h index 3851dc95c..bc6a321c6 100644 --- a/include/astrometry/constellations.h +++ b/include/astrometry/constellations.h @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2007 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #ifndef CONSTELLATIONS_H diff --git a/include/astrometry/convolve-image.h b/include/astrometry/convolve-image.h index 7adba654b..ed4462574 100644 --- a/include/astrometry/convolve-image.h +++ b/include/astrometry/convolve-image.h @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2011 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #ifndef CONVOLVE_IMAGE_H diff --git a/include/astrometry/ctmf.h b/include/astrometry/ctmf.h index 550bb8c27..bec637aa0 100644 --- a/include/astrometry/ctmf.h +++ b/include/astrometry/ctmf.h @@ -1,3 +1,4 @@ +// See util/ctmf.c for copyright & license #ifndef CTMF_H #define CTMF_H diff --git a/include/astrometry/datalog.h b/include/astrometry/datalog.h index 85fb76704..499022c3f 100644 --- a/include/astrometry/datalog.h +++ b/include/astrometry/datalog.h @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2010 Dustin Lang - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #ifndef DATA_LOG_H #define DATA_LOG_H diff --git a/include/astrometry/dimage.h b/include/astrometry/dimage.h index 54e29525a..a69f1f06a 100644 --- a/include/astrometry/dimage.h +++ b/include/astrometry/dimage.h @@ -1,21 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Michael Blanton, Keir Mierle, David W. Hogg, - Sam Roweis and Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free - Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA - 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #ifndef DIMAGE_H diff --git a/include/astrometry/dualtree.h b/include/astrometry/dualtree.h index ea75878fb..d84edb33b 100644 --- a/include/astrometry/dualtree.h +++ b/include/astrometry/dualtree.h @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of libkd. +# Licensed under a 3-clause BSD style license - see LICENSE */ /** diff --git a/include/astrometry/dualtree_nearestneighbour.h b/include/astrometry/dualtree_nearestneighbour.h index ab9b136b0..64859937e 100644 --- a/include/astrometry/dualtree_nearestneighbour.h +++ b/include/astrometry/dualtree_nearestneighbour.h @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2008, 2010 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #ifndef DUALTREE_NEAREST_NEIGHBOUR_H diff --git a/include/astrometry/dualtree_rangesearch.h b/include/astrometry/dualtree_rangesearch.h index fcd179a15..9676f6cc8 100644 --- a/include/astrometry/dualtree_rangesearch.h +++ b/include/astrometry/dualtree_rangesearch.h @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #ifndef DUALTREE_RANGE_SEARCH_H diff --git a/include/astrometry/eigen-math.h b/include/astrometry/eigen-math.h index 7a5bd97fa..39a261680 100644 --- a/include/astrometry/eigen-math.h +++ b/include/astrometry/eigen-math.h @@ -1,4 +1,7 @@ - +/* +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE + */ typedef struct { double* data; int cols; diff --git a/include/astrometry/engine.h b/include/astrometry/engine.h index 599cda06a..445dfc29a 100644 --- a/include/astrometry/engine.h +++ b/include/astrometry/engine.h @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2008 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #ifndef ENGINE_H diff --git a/include/astrometry/errors.h b/include/astrometry/errors.h index 56109fcf7..08f8fb765 100644 --- a/include/astrometry/errors.h +++ b/include/astrometry/errors.h @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2008, 2010 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #ifndef AN_ERRORS_H diff --git a/include/astrometry/fileutils.h b/include/astrometry/fileutils.h index e2652748d..a01f0944f 100644 --- a/include/astrometry/fileutils.h +++ b/include/astrometry/fileutils.h @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2014 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #ifndef FILEUTILS_H diff --git a/include/astrometry/fit-wcs.h b/include/astrometry/fit-wcs.h index f334252ad..5700ae401 100644 --- a/include/astrometry/fit-wcs.h +++ b/include/astrometry/fit-wcs.h @@ -1,20 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. - Copyright 2012 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #ifndef FIT_WCS_H diff --git a/include/astrometry/fits-guess-scale.h b/include/astrometry/fits-guess-scale.h index 72f1a378c..fad3c8536 100644 --- a/include/astrometry/fits-guess-scale.h +++ b/include/astrometry/fits-guess-scale.h @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2008 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #ifndef FITS_GUESS_SCALE_H diff --git a/include/astrometry/fitsbin.h b/include/astrometry/fitsbin.h index 88c4b3fbf..fb6782803 100644 --- a/include/astrometry/fitsbin.h +++ b/include/astrometry/fitsbin.h @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2007 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #ifndef FITSBIN_H diff --git a/include/astrometry/fitsfile.h b/include/astrometry/fitsfile.h index 8305b34e5..335eda45f 100644 --- a/include/astrometry/fitsfile.h +++ b/include/astrometry/fitsfile.h @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2007 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #ifndef FITSFILE_H diff --git a/include/astrometry/fitsioutils.h b/include/astrometry/fitsioutils.h index cace555cc..c7e76ce44 100644 --- a/include/astrometry/fitsioutils.h +++ b/include/astrometry/fitsioutils.h @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #ifndef FITSIO_UTILS_H diff --git a/include/astrometry/fitstable.h b/include/astrometry/fitstable.h index 2b1f3a3b5..a0014e537 100644 --- a/include/astrometry/fitstable.h +++ b/include/astrometry/fitstable.h @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2008 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #ifndef FITSTABLE_H diff --git a/include/astrometry/gslutils.h b/include/astrometry/gslutils.h index 11d60a031..81996f71c 100644 --- a/include/astrometry/gslutils.h +++ b/include/astrometry/gslutils.h @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006-2008 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #ifndef AN_GSL_UTILS_H diff --git a/include/astrometry/hd.h b/include/astrometry/hd.h index 94474ae1a..da9d5ca5c 100644 --- a/include/astrometry/hd.h +++ b/include/astrometry/hd.h @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2008, 2009 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #ifndef AN_HD_H diff --git a/include/astrometry/healpix-utils.h b/include/astrometry/healpix-utils.h index fa2a21b69..1698792c6 100644 --- a/include/astrometry/healpix-utils.h +++ b/include/astrometry/healpix-utils.h @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2009 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #ifndef HEALPIX_UTILS_H diff --git a/include/astrometry/healpix.h b/include/astrometry/healpix.h index 56d5811ed..d5f2d0c8c 100644 --- a/include/astrometry/healpix.h +++ b/include/astrometry/healpix.h @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #ifndef HEALPIX_H diff --git a/include/astrometry/hpquads.h b/include/astrometry/hpquads.h index 7ade216c1..31035626c 100644 --- a/include/astrometry/hpquads.h +++ b/include/astrometry/hpquads.h @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2009 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #ifndef HPQUADS_H diff --git a/include/astrometry/image2xy-files.h b/include/astrometry/image2xy-files.h index df6a3a96d..0e4583075 100644 --- a/include/astrometry/image2xy-files.h +++ b/include/astrometry/image2xy-files.h @@ -1,20 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006-2008 Michael Blanton, Keir Mierle, David W. Hogg, - Sam Roweis and Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #ifndef IMAGE2XY_FILES_H diff --git a/include/astrometry/image2xy.h b/include/astrometry/image2xy.h index ee6a592c2..ab5167678 100644 --- a/include/astrometry/image2xy.h +++ b/include/astrometry/image2xy.h @@ -1,20 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006-2008 Michael Blanton, Keir Mierle, David W. Hogg, - Sam Roweis and Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #ifndef IMAGE2XY_H diff --git a/include/astrometry/index.h b/include/astrometry/index.h index 05fa98ee8..2f5469720 100644 --- a/include/astrometry/index.h +++ b/include/astrometry/index.h @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2007-2008 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #ifndef AN_INDEX_H diff --git a/include/astrometry/intmap.h b/include/astrometry/intmap.h index f2bbc4bc9..b7541048a 100644 --- a/include/astrometry/intmap.h +++ b/include/astrometry/intmap.h @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2009 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #ifndef INTMAP_H diff --git a/include/astrometry/ioutils.h b/include/astrometry/ioutils.h index b347665aa..32bcc606d 100644 --- a/include/astrometry/ioutils.h +++ b/include/astrometry/ioutils.h @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #ifndef IOUTILS_H diff --git a/include/astrometry/kdtree.h b/include/astrometry/kdtree.h index c1eb27540..223e8ea88 100644 --- a/include/astrometry/kdtree.h +++ b/include/astrometry/kdtree.h @@ -1,19 +1,6 @@ /* - This file is part of libkd. - Copyright 2006-2008 Dustin Lang and Keir Mierle. - - libkd 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, version 2. - - libkd 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 libkd; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of libkd. +# Licensed under a 3-clause BSD style license - see LICENSE */ #ifndef KDTREE_H diff --git a/include/astrometry/kdtree_fits_io.h b/include/astrometry/kdtree_fits_io.h index 7abb42027..38582190e 100644 --- a/include/astrometry/kdtree_fits_io.h +++ b/include/astrometry/kdtree_fits_io.h @@ -1,19 +1,6 @@ /* - This file is part of libkd. - Copyright 2006-2008 Dustin Lang and Keir Mierle. - - libkd 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, version 2. - - libkd 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 libkd; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of libkd. +# Licensed under a 3-clause BSD style license - see LICENSE */ #ifndef KDTREE_FITS_IO_H diff --git a/include/astrometry/keywords.h b/include/astrometry/keywords.h index 67a27a50b..85d20e527 100644 --- a/include/astrometry/keywords.h +++ b/include/astrometry/keywords.h @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ // borrowed from http://rlove.org/log/2005102601. diff --git a/include/astrometry/log.h b/include/astrometry/log.h index 0ee896a5e..f129b85d6 100644 --- a/include/astrometry/log.h +++ b/include/astrometry/log.h @@ -1,3 +1,7 @@ +/* +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE + */ #ifndef _LOG_H #define _LOG_H diff --git a/include/astrometry/matchfile.h b/include/astrometry/matchfile.h index 0c6b2e9ff..caa649485 100644 --- a/include/astrometry/matchfile.h +++ b/include/astrometry/matchfile.h @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #ifndef MATCHFILE_H diff --git a/include/astrometry/matchobj.h b/include/astrometry/matchobj.h index 156541a49..7db299203 100644 --- a/include/astrometry/matchobj.h +++ b/include/astrometry/matchobj.h @@ -1,20 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. - Copyright 2009 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #ifndef MATCHOBJ_H diff --git a/include/astrometry/mathutil.h b/include/astrometry/mathutil.h index 6891e0244..925e6c43e 100644 --- a/include/astrometry/mathutil.h +++ b/include/astrometry/mathutil.h @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #ifndef MATHUTIL_H diff --git a/include/astrometry/mathutil.inc b/include/astrometry/mathutil.inc index a38df954b..33a2c3822 100644 --- a/include/astrometry/mathutil.inc +++ b/include/astrometry/mathutil.inc @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006-2008 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/include/astrometry/merge-index.h b/include/astrometry/merge-index.h index df7041d6a..23faadc1b 100644 --- a/include/astrometry/merge-index.h +++ b/include/astrometry/merge-index.h @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2008, 2009 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #ifndef MERGE_INDEX_H diff --git a/include/astrometry/multiindex.h b/include/astrometry/multiindex.h index 14bfc5984..bd215f2f5 100644 --- a/include/astrometry/multiindex.h +++ b/include/astrometry/multiindex.h @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2010, 2012 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #ifndef AN_MULTIINDEX_H diff --git a/include/astrometry/new-wcs.h b/include/astrometry/new-wcs.h index 7a5689ccf..3db466015 100644 --- a/include/astrometry/new-wcs.h +++ b/include/astrometry/new-wcs.h @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2008 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #ifndef NEW_WCS_H #define NEW_WCS_H diff --git a/include/astrometry/ngc2000.h b/include/astrometry/ngc2000.h index dcc3a893f..69b89fcbc 100644 --- a/include/astrometry/ngc2000.h +++ b/include/astrometry/ngc2000.h @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2007 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #ifndef NGC2000_H diff --git a/include/astrometry/ngcic-accurate.h b/include/astrometry/ngcic-accurate.h index a73c5d501..84a18df15 100644 --- a/include/astrometry/ngcic-accurate.h +++ b/include/astrometry/ngcic-accurate.h @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2007 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #ifndef NGCIC_ACCURATE_H diff --git a/include/astrometry/nomad-fits.h b/include/astrometry/nomad-fits.h index cbee7494e..290df1249 100644 --- a/include/astrometry/nomad-fits.h +++ b/include/astrometry/nomad-fits.h @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #ifndef NOMAD_FITS_H diff --git a/include/astrometry/nomad.h b/include/astrometry/nomad.h index 0fb68316d..7d97148e8 100644 --- a/include/astrometry/nomad.h +++ b/include/astrometry/nomad.h @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #ifndef NOMAD_H diff --git a/include/astrometry/os-features.h b/include/astrometry/os-features.h index 831540cfa..ba1879e81 100644 --- a/include/astrometry/os-features.h +++ b/include/astrometry/os-features.h @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2008, 2010, 2012 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #ifndef OS_FEATURES_H #define OS_FEATURES_H diff --git a/include/astrometry/permutedsort.h b/include/astrometry/permutedsort.h index 22da670bf..4a8923a22 100644 --- a/include/astrometry/permutedsort.h +++ b/include/astrometry/permutedsort.h @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #ifndef PERMUTED_SORT_H diff --git a/include/astrometry/plotannotations.h b/include/astrometry/plotannotations.h index 20c436bc8..f417678c7 100644 --- a/include/astrometry/plotannotations.h +++ b/include/astrometry/plotannotations.h @@ -1,3 +1,7 @@ +/* +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE + */ #ifndef PLOTANNOTATIONS_H #define PLOTANNOTATIONS_H diff --git a/include/astrometry/plotfill.h b/include/astrometry/plotfill.h index c41599067..e849f4c28 100644 --- a/include/astrometry/plotfill.h +++ b/include/astrometry/plotfill.h @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2009 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #ifndef PLOTFILL_H #define PLOTFILL_H diff --git a/include/astrometry/plotgrid.h b/include/astrometry/plotgrid.h index 01e9c0296..c744690cb 100644 --- a/include/astrometry/plotgrid.h +++ b/include/astrometry/plotgrid.h @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2009, 2011 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #ifndef PLOTGRID_H #define PLOTGRID_H diff --git a/include/astrometry/plothealpix.h b/include/astrometry/plothealpix.h index bc1536aa2..716317403 100644 --- a/include/astrometry/plothealpix.h +++ b/include/astrometry/plothealpix.h @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2010, 2011 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #ifndef PLOTHEALPIX_H #define PLOTHEALPIX_H diff --git a/include/astrometry/plotimage.h b/include/astrometry/plotimage.h index df1d70720..29a235ef4 100644 --- a/include/astrometry/plotimage.h +++ b/include/astrometry/plotimage.h @@ -1,3 +1,7 @@ +/* +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE + */ #ifndef PLOTIMAGE_H #define PLOTIMAGE_H diff --git a/include/astrometry/plotindex.h b/include/astrometry/plotindex.h index 38de100e9..a64d1be8e 100644 --- a/include/astrometry/plotindex.h +++ b/include/astrometry/plotindex.h @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2010 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #ifndef PLOTINDEX_H #define PLOTINDEX_H diff --git a/include/astrometry/plotmatch.h b/include/astrometry/plotmatch.h index c2fed26a1..ec0b4b7ff 100644 --- a/include/astrometry/plotmatch.h +++ b/include/astrometry/plotmatch.h @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2009 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #ifndef PLOTMATCH_H #define PLOTMATCH_H diff --git a/include/astrometry/plotoutline.h b/include/astrometry/plotoutline.h index c06840a8e..cbe9e3325 100644 --- a/include/astrometry/plotoutline.h +++ b/include/astrometry/plotoutline.h @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2009, 2010 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #ifndef PLOTOUTLINE_H #define PLOTOUTLINE_H diff --git a/include/astrometry/plotradec.h b/include/astrometry/plotradec.h index 3e81b3be6..f5f0103cc 100644 --- a/include/astrometry/plotradec.h +++ b/include/astrometry/plotradec.h @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2009, 2010 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #ifndef PLOTRADEC_H diff --git a/include/astrometry/plotstuff.h b/include/astrometry/plotstuff.h index 05959fd9a..cd1d3f19d 100644 --- a/include/astrometry/plotstuff.h +++ b/include/astrometry/plotstuff.h @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2009, 2010, 2011 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #ifndef PLOTSTUFF_H diff --git a/include/astrometry/plotxy.h b/include/astrometry/plotxy.h index d6b8083aa..1107619a3 100644 --- a/include/astrometry/plotxy.h +++ b/include/astrometry/plotxy.h @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2009, 2010 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #ifndef PLOTXY_H diff --git a/include/astrometry/qfits_convert.h b/include/astrometry/qfits_convert.h index d6ac322dd..a92d8b679 100644 --- a/include/astrometry/qfits_convert.h +++ b/include/astrometry/qfits_convert.h @@ -1,5 +1,6 @@ - /** Copyright 2009 Dustin Lang. +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ /** diff --git a/include/astrometry/qfits_keywords.h b/include/astrometry/qfits_keywords.h index e2384f8d5..4bebc6d2f 100644 --- a/include/astrometry/qfits_keywords.h +++ b/include/astrometry/qfits_keywords.h @@ -1,6 +1,10 @@ /* This file was added by the Astrometry.net team. Copyright 2007 Dustin Lang. + +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE + */ #ifndef QFITS_KEYWORDS_H diff --git a/include/astrometry/qidxfile.h b/include/astrometry/qidxfile.h index f80eec188..b442ed9c9 100644 --- a/include/astrometry/qidxfile.h +++ b/include/astrometry/qidxfile.h @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #ifndef QIDXFILE_H diff --git a/include/astrometry/quad-builder.h b/include/astrometry/quad-builder.h index f6d563072..eb6535ee6 100644 --- a/include/astrometry/quad-builder.h +++ b/include/astrometry/quad-builder.h @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2009 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #ifndef QUAD_BUILDER_H #define QUAD_BUILDER_H diff --git a/include/astrometry/quad-utils.h b/include/astrometry/quad-utils.h index f45d2a8c4..212bbf8d4 100644 --- a/include/astrometry/quad-utils.h +++ b/include/astrometry/quad-utils.h @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006-2009 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #ifndef QUAD_UTILS_H #define QUAD_UTILS_H diff --git a/include/astrometry/quadfile.h b/include/astrometry/quadfile.h index 116bc4768..7c8a14f37 100644 --- a/include/astrometry/quadfile.h +++ b/include/astrometry/quadfile.h @@ -1,20 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. - Copyright 2009, 2010 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #ifndef QUADFILE_H diff --git a/include/astrometry/rdlist.h b/include/astrometry/rdlist.h index 0b6a42e52..42a21487b 100644 --- a/include/astrometry/rdlist.h +++ b/include/astrometry/rdlist.h @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #ifndef RDLIST_H diff --git a/include/astrometry/resample.h b/include/astrometry/resample.h index 7be805916..f8878572f 100644 --- a/include/astrometry/resample.h +++ b/include/astrometry/resample.h @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2011 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #ifndef RESAMPLE_H diff --git a/include/astrometry/resort-xylist.h b/include/astrometry/resort-xylist.h index eef8e4626..b178706e3 100644 --- a/include/astrometry/resort-xylist.h +++ b/include/astrometry/resort-xylist.h @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2008 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #ifndef RESORT_XYLIST_H #define RESORT_XYLIST_H diff --git a/include/astrometry/scamp-catalog.h b/include/astrometry/scamp-catalog.h index 0269b94fa..63e5126bf 100644 --- a/include/astrometry/scamp-catalog.h +++ b/include/astrometry/scamp-catalog.h @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2008 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #ifndef SCAMP_CATALOG_H diff --git a/include/astrometry/scamp.h b/include/astrometry/scamp.h index 94003e922..7773b2c07 100644 --- a/include/astrometry/scamp.h +++ b/include/astrometry/scamp.h @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2008 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #ifndef BLIND_SCAMP_H diff --git a/include/astrometry/simplexy-common.h b/include/astrometry/simplexy-common.h index 258da3b5c..4a8073cd4 100644 --- a/include/astrometry/simplexy-common.h +++ b/include/astrometry/simplexy-common.h @@ -1,20 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Michael Blanton, Keir Mierle, David W. Hogg, Sam Roweis - and Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ /* diff --git a/include/astrometry/simplexy.h b/include/astrometry/simplexy.h index ac7ca9e41..4148dd4d9 100644 --- a/include/astrometry/simplexy.h +++ b/include/astrometry/simplexy.h @@ -1,21 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2007 Michael Blanton, Keir Mierle, David W. Hogg, - Sam Roweis and Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free - Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA - 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #ifndef SIMPLEXY2_H #define SIMPLEXY2_H diff --git a/include/astrometry/sip-utils.h b/include/astrometry/sip-utils.h index b56d67dd4..84d6cc9ac 100644 --- a/include/astrometry/sip-utils.h +++ b/include/astrometry/sip-utils.h @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2007, 2010 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #ifndef SIP_UTILS_H diff --git a/include/astrometry/sip.h b/include/astrometry/sip.h index cb5d3a4ec..61842d17a 100644 --- a/include/astrometry/sip.h +++ b/include/astrometry/sip.h @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Keir Mierle, David W. Hogg, Sam Roweis and Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #ifndef ANSIP_H diff --git a/include/astrometry/sip_qfits.h b/include/astrometry/sip_qfits.h index 865d3ce74..4901cb679 100644 --- a/include/astrometry/sip_qfits.h +++ b/include/astrometry/sip_qfits.h @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Keir Mierle, David W. Hogg, Sam Roweis and Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #ifndef SIP_QFITS_H diff --git a/include/astrometry/solvedclient.h b/include/astrometry/solvedclient.h index 86a0937c7..9a7494db8 100644 --- a/include/astrometry/solvedclient.h +++ b/include/astrometry/solvedclient.h @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #ifndef SOLVEDCLIENT_H diff --git a/include/astrometry/solvedfile.h b/include/astrometry/solvedfile.h index 39a0cea73..8596d54aa 100644 --- a/include/astrometry/solvedfile.h +++ b/include/astrometry/solvedfile.h @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #ifndef SOLVEDFILE_H diff --git a/include/astrometry/solver.h b/include/astrometry/solver.h index 4631c4858..11b66a1cb 100644 --- a/include/astrometry/solver.h +++ b/include/astrometry/solver.h @@ -1,20 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. - Copyright 2010 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #ifndef SOLVER_H diff --git a/include/astrometry/starkd.h b/include/astrometry/starkd.h index c8f834da5..87820c467 100644 --- a/include/astrometry/starkd.h +++ b/include/astrometry/starkd.h @@ -1,20 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006-2008 Dustin Lang, Keir Mierle and Sam Roweis. - Copyright 2009-2010 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #ifndef STAR_KD_H diff --git a/include/astrometry/starutil.h b/include/astrometry/starutil.h index e2d614e84..3508eb404 100644 --- a/include/astrometry/starutil.h +++ b/include/astrometry/starutil.h @@ -1,20 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006-2008 Dustin Lang, Keir Mierle and Sam Roweis. - Copyright 2012 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #ifndef STARUTIL_H diff --git a/include/astrometry/starutil.inc b/include/astrometry/starutil.inc index 8329aef76..0b5304b63 100644 --- a/include/astrometry/starutil.inc +++ b/include/astrometry/starutil.inc @@ -1,20 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006-2008 Dustin Lang, Keir Mierle and Sam Roweis. - Copyright 2010 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/include/astrometry/starxy.h b/include/astrometry/starxy.h index be3baa4c7..9bfbc7e61 100644 --- a/include/astrometry/starxy.h +++ b/include/astrometry/starxy.h @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2008 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #ifndef STARXY_H diff --git a/include/astrometry/tabsort.h b/include/astrometry/tabsort.h index baee64ea6..082e08a04 100644 --- a/include/astrometry/tabsort.h +++ b/include/astrometry/tabsort.h @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2008 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #ifndef TABSORT_H diff --git a/include/astrometry/thread-specific.inc b/include/astrometry/thread-specific.inc index 3b45611e9..6180bac4c 100644 --- a/include/astrometry/thread-specific.inc +++ b/include/astrometry/thread-specific.inc @@ -1,3 +1,8 @@ +/* +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE +*/ + #include #define GLUE2(x, y) x ## _ ## y diff --git a/include/astrometry/tic.h b/include/astrometry/tic.h index bd38b6e61..9b4a98162 100644 --- a/include/astrometry/tic.h +++ b/include/astrometry/tic.h @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #ifndef TIC_H diff --git a/include/astrometry/tpv.h b/include/astrometry/tpv.h index e4d359e37..ff4cb26d7 100644 --- a/include/astrometry/tpv.h +++ b/include/astrometry/tpv.h @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Keir Mierle, David W. Hogg, Sam Roweis and Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #ifndef ANTPV_H diff --git a/include/astrometry/tweak.h b/include/astrometry/tweak.h index 5ee78b9f1..e420b5682 100644 --- a/include/astrometry/tweak.h +++ b/include/astrometry/tweak.h @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Keir Mierle, David W. Hogg, Sam Roweis and Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #ifndef _TWEAK_INTERNAL_H diff --git a/include/astrometry/tweak2.h b/include/astrometry/tweak2.h index 9c25ca00c..bb89b49e3 100644 --- a/include/astrometry/tweak2.h +++ b/include/astrometry/tweak2.h @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2010 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #ifndef TWEAK_2_H diff --git a/include/astrometry/tycho2-fits.h b/include/astrometry/tycho2-fits.h index 75500f62f..621b5bf53 100644 --- a/include/astrometry/tycho2-fits.h +++ b/include/astrometry/tycho2-fits.h @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #ifndef TYCHO2_FITS_H diff --git a/include/astrometry/tycho2.h b/include/astrometry/tycho2.h index 7efdd1fe0..21b2e3c70 100644 --- a/include/astrometry/tycho2.h +++ b/include/astrometry/tycho2.h @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ /* diff --git a/include/astrometry/ucac3.h b/include/astrometry/ucac3.h index a76442e72..89566bfc9 100644 --- a/include/astrometry/ucac3.h +++ b/include/astrometry/ucac3.h @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2011 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #ifndef UCAC3_H diff --git a/include/astrometry/uniformize-catalog.h b/include/astrometry/uniformize-catalog.h index d6f8d3388..3cb04fe01 100644 --- a/include/astrometry/uniformize-catalog.h +++ b/include/astrometry/uniformize-catalog.h @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2009, 2011 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #ifndef UNIFORMIZE_CATALOG_H #define UNIFORMIZE_CATALOG_H diff --git a/include/astrometry/unpermute-quads.h b/include/astrometry/unpermute-quads.h index 817f96e0e..92142b084 100644 --- a/include/astrometry/unpermute-quads.h +++ b/include/astrometry/unpermute-quads.h @@ -1,20 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. - Copyright 2009 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #ifndef UNPERMUTE_QUADS_H diff --git a/include/astrometry/unpermute-stars.h b/include/astrometry/unpermute-stars.h index a36a780de..b45590dcf 100644 --- a/include/astrometry/unpermute-stars.h +++ b/include/astrometry/unpermute-stars.h @@ -1,20 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006-2008 Dustin Lang, Keir Mierle and Sam Roweis. - Copyright 2009 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #ifndef UNPERMUTE_STARS_H diff --git a/include/astrometry/usnob-fits.h b/include/astrometry/usnob-fits.h index 99d97b560..39c808e1e 100644 --- a/include/astrometry/usnob-fits.h +++ b/include/astrometry/usnob-fits.h @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #ifndef USNOB_FITS_H diff --git a/include/astrometry/usnob.h b/include/astrometry/usnob.h index 208e3052f..002610477 100644 --- a/include/astrometry/usnob.h +++ b/include/astrometry/usnob.h @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #ifndef USNOB_H diff --git a/include/astrometry/verify.h b/include/astrometry/verify.h index 2c142bb82..9a1a06cdd 100644 --- a/include/astrometry/verify.h +++ b/include/astrometry/verify.h @@ -1,20 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. - Copyright 2012 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #ifndef VERIFY_H diff --git a/include/astrometry/wcs-rd2xy.h b/include/astrometry/wcs-rd2xy.h index d4e8df28d..cb4467eea 100644 --- a/include/astrometry/wcs-rd2xy.h +++ b/include/astrometry/wcs-rd2xy.h @@ -1,20 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006-2008 Dustin Lang, Keir Mierle and Sam Roweis. - Copyright 2010 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #ifndef WCS_RD2XY_H diff --git a/include/astrometry/wcs-xy2rd.h b/include/astrometry/wcs-xy2rd.h index 974661f32..80f678323 100644 --- a/include/astrometry/wcs-xy2rd.h +++ b/include/astrometry/wcs-xy2rd.h @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006-2008 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #ifndef WCS_XY2RD_H diff --git a/include/astrometry/xylist.h b/include/astrometry/xylist.h index 66653f34a..a8427786c 100644 --- a/include/astrometry/xylist.h +++ b/include/astrometry/xylist.h @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006-2008 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #ifndef XYLIST_H diff --git a/libkd/AUTHORS b/libkd/AUTHORS new file mode 100644 index 000000000..dbb50d694 --- /dev/null +++ b/libkd/AUTHORS @@ -0,0 +1,2 @@ +Dustin Lang +Keir Mierle diff --git a/libkd/LICENSE b/libkd/LICENSE index d511905c1..ccf5f7b3a 100644 --- a/libkd/LICENSE +++ b/libkd/LICENSE @@ -1,339 +1,30 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Lesser General Public License instead.) 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 -this service 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 make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. 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. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute 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 and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -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 -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the 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 a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, 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. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE 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. - - 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 -convey 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 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. - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision 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, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This 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. +Copyright (c) 2006-2015, Libkd Developers + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + +* Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + +* 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. + +* Neither the name of the Libkd Team 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. diff --git a/libkd/Makefile b/libkd/Makefile index b70ce744c..870d7767f 100644 --- a/libkd/Makefile +++ b/libkd/Makefile @@ -1,19 +1,5 @@ -# This file is part of libkd. -# Copyright 2006-2008 Dustin Lang and Keir Mierle. -# Copyright 2012 Dustin Lang. -# -# libkd 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, version 2. -# -# libkd 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 libkd; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of libkd. +# Licensed under a 3-clause BSD style license - see LICENSE BASEDIR := .. COMMON := $(BASEDIR)/util diff --git a/libkd/Makefile.min b/libkd/Makefile.min index 9dc60fd7d..ec2ab19b7 100644 --- a/libkd/Makefile.min +++ b/libkd/Makefile.min @@ -1,3 +1,5 @@ +# This file is part of libkd. +# Licensed under a 3-clause BSD style license - see LICENSE all: .PHONY: all diff --git a/libkd/README b/libkd/README index 3584efa59..28260bf02 100644 --- a/libkd/README +++ b/libkd/README @@ -1,8 +1,8 @@ libkd: a library for building and using kd-trees. -libkd is Copyright 2006, 2007, 2008 Dustin Lang and Keir Mierle. -libkd is free software licensed under the GNU GPL version 2. -See the file LICENSE for the full terms of the GNU GPL. +libkd is Copyright 2006-2015 Dustin Lang and Keir Mierle. +libkd is free software, licensed under a 3-clause BSD-style license. +See the file LICENSE for the full terms. Dustin Lang is dstndstn (at) gmail (dot) com Keir Mierle is mierle (at) gmail (dot) com diff --git a/libkd/checktree.c b/libkd/checktree.c index 11f13f764..fbe128539 100644 --- a/libkd/checktree.c +++ b/libkd/checktree.c @@ -1,19 +1,6 @@ /* - This file is part of libkd. - Copyright 2006-2008 Dustin Lang and Keir Mierle. - - libkd 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, version 2. - - libkd 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 libkd; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of libkd. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/libkd/demo.c b/libkd/demo.c index 7f3164f73..9c75b8e37 100644 --- a/libkd/demo.c +++ b/libkd/demo.c @@ -1,3 +1,7 @@ +/* +# This file is part of libkd. +# Licensed under a 3-clause BSD style license - see LICENSE + */ #include #include "kdtree.h" diff --git a/libkd/dualtree.c b/libkd/dualtree.c index 287e65075..49af5eb77 100644 --- a/libkd/dualtree.c +++ b/libkd/dualtree.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of libkd. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include "dualtree.h" diff --git a/libkd/dualtree_nearestneighbour.c b/libkd/dualtree_nearestneighbour.c index 972dc2005..b4a5091c6 100644 --- a/libkd/dualtree_nearestneighbour.c +++ b/libkd/dualtree_nearestneighbour.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2008 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of libkd. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/libkd/dualtree_rangesearch.c b/libkd/dualtree_rangesearch.c index fce42c2fd..3ca1f5e1d 100644 --- a/libkd/dualtree_rangesearch.c +++ b/libkd/dualtree_rangesearch.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of libkd. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/libkd/fix-bb.c b/libkd/fix-bb.c index 8001c2bd7..b0316c692 100644 --- a/libkd/fix-bb.c +++ b/libkd/fix-bb.c @@ -1,19 +1,6 @@ /* - This file is part of libkd. - Copyright 2008 Dustin Lang. - - libkd 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, version 2. - - libkd 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 libkd; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of libkd. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/libkd/kdint_ddd.c b/libkd/kdint_ddd.c index 67b206345..49093c7d6 100644 --- a/libkd/kdint_ddd.c +++ b/libkd/kdint_ddd.c @@ -1,19 +1,6 @@ /* - This file is part of libkd. - Copyright 2006-2008 Dustin Lang and Keir Mierle. - - libkd 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, version 2. - - libkd 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 libkd; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of libkd. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include "kdtree.h" diff --git a/libkd/kdint_dds.c b/libkd/kdint_dds.c index 54cebcd1e..a455479b5 100644 --- a/libkd/kdint_dds.c +++ b/libkd/kdint_dds.c @@ -1,19 +1,6 @@ /* - This file is part of libkd. - Copyright 2006-2008 Dustin Lang and Keir Mierle. - - libkd 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, version 2. - - libkd 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 libkd; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of libkd. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include "kdtree.h" diff --git a/libkd/kdint_ddu.c b/libkd/kdint_ddu.c index b85015623..b03cafdd8 100644 --- a/libkd/kdint_ddu.c +++ b/libkd/kdint_ddu.c @@ -1,19 +1,6 @@ /* - This file is part of libkd. - Copyright 2006-2008 Dustin Lang and Keir Mierle. - - libkd 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, version 2. - - libkd 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 libkd; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of libkd. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include "kdtree.h" diff --git a/libkd/kdint_dss.c b/libkd/kdint_dss.c index 6be7ad059..0fe77406c 100644 --- a/libkd/kdint_dss.c +++ b/libkd/kdint_dss.c @@ -1,19 +1,6 @@ /* - This file is part of libkd. - Copyright 2006-2008 Dustin Lang and Keir Mierle. - - libkd 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, version 2. - - libkd 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 libkd; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of libkd. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include "kdtree.h" diff --git a/libkd/kdint_dtype_d.h b/libkd/kdint_dtype_d.h index 46abeef28..2baed04fe 100644 --- a/libkd/kdint_dtype_d.h +++ b/libkd/kdint_dtype_d.h @@ -1,19 +1,6 @@ /* - This file is part of libkd. - Copyright 2006-2008 Dustin Lang and Keir Mierle. - - libkd 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, version 2. - - libkd 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 libkd; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of libkd. +# Licensed under a 3-clause BSD style license - see LICENSE */ typedef double dtype; diff --git a/libkd/kdint_dtype_f.h b/libkd/kdint_dtype_f.h index 1b6fdb30f..f75ba5ea6 100644 --- a/libkd/kdint_dtype_f.h +++ b/libkd/kdint_dtype_f.h @@ -1,19 +1,6 @@ /* - This file is part of libkd. - Copyright 2006-2008 Dustin Lang and Keir Mierle. - - libkd 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, version 2. - - libkd 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 libkd; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of libkd. +# Licensed under a 3-clause BSD style license - see LICENSE */ typedef float dtype; diff --git a/libkd/kdint_dtype_s.h b/libkd/kdint_dtype_s.h index 4a8abddfc..71007755c 100644 --- a/libkd/kdint_dtype_s.h +++ b/libkd/kdint_dtype_s.h @@ -1,19 +1,6 @@ /* - This file is part of libkd. - Copyright 2006-2008 Dustin Lang and Keir Mierle. - - libkd 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, version 2. - - libkd 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 libkd; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of libkd. +# Licensed under a 3-clause BSD style license - see LICENSE */ typedef u16 dtype; diff --git a/libkd/kdint_dtype_u.h b/libkd/kdint_dtype_u.h index 80ac7b10c..63010dd14 100644 --- a/libkd/kdint_dtype_u.h +++ b/libkd/kdint_dtype_u.h @@ -1,19 +1,6 @@ /* - This file is part of libkd. - Copyright 2006-2008 Dustin Lang and Keir Mierle. - - libkd 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, version 2. - - libkd 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 libkd; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of libkd. +# Licensed under a 3-clause BSD style license - see LICENSE */ typedef u32 dtype; diff --git a/libkd/kdint_duu.c b/libkd/kdint_duu.c index 2ec813220..cd1bab9c8 100644 --- a/libkd/kdint_duu.c +++ b/libkd/kdint_duu.c @@ -1,19 +1,6 @@ /* - This file is part of libkd. - Copyright 2006-2008 Dustin Lang and Keir Mierle. - - libkd 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, version 2. - - libkd 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 libkd; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of libkd. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include "kdtree.h" diff --git a/libkd/kdint_etype_d.h b/libkd/kdint_etype_d.h index c6891965f..08775718d 100644 --- a/libkd/kdint_etype_d.h +++ b/libkd/kdint_etype_d.h @@ -1,19 +1,6 @@ /* - This file is part of libkd. - Copyright 2006-2008 Dustin Lang and Keir Mierle. - - libkd 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, version 2. - - libkd 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 libkd; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of libkd. +# Licensed under a 3-clause BSD style license - see LICENSE */ typedef double etype; diff --git a/libkd/kdint_etype_f.h b/libkd/kdint_etype_f.h index 69cd21d72..3fbea1d3c 100644 --- a/libkd/kdint_etype_f.h +++ b/libkd/kdint_etype_f.h @@ -1,19 +1,6 @@ /* - This file is part of libkd. - Copyright 2006-2008 Dustin Lang and Keir Mierle. - - libkd 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, version 2. - - libkd 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 libkd; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of libkd. +# Licensed under a 3-clause BSD style license - see LICENSE */ typedef float etype; diff --git a/libkd/kdint_etype_s.h b/libkd/kdint_etype_s.h index a6f09840d..31493b853 100644 --- a/libkd/kdint_etype_s.h +++ b/libkd/kdint_etype_s.h @@ -1,19 +1,6 @@ /* - This file is part of libkd. - Copyright 2006-2008 Dustin Lang and Keir Mierle. - - libkd 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, version 2. - - libkd 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 libkd; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of libkd. +# Licensed under a 3-clause BSD style license - see LICENSE */ typedef u16 etype; diff --git a/libkd/kdint_etype_u.h b/libkd/kdint_etype_u.h index b5b091eee..88fc12c39 100644 --- a/libkd/kdint_etype_u.h +++ b/libkd/kdint_etype_u.h @@ -1,19 +1,6 @@ /* - This file is part of libkd. - Copyright 2006-2008 Dustin Lang and Keir Mierle. - - libkd 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, version 2. - - libkd 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 libkd; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of libkd. +# Licensed under a 3-clause BSD style license - see LICENSE */ typedef u32 etype; diff --git a/libkd/kdint_fff.c b/libkd/kdint_fff.c index ed6fb1dac..84c3c4409 100644 --- a/libkd/kdint_fff.c +++ b/libkd/kdint_fff.c @@ -1,19 +1,6 @@ /* - This file is part of libkd. - Copyright 2006-2008 Dustin Lang and Keir Mierle. - - libkd 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, version 2. - - libkd 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 libkd; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of libkd. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include "kdtree.h" diff --git a/libkd/kdint_ttype_d.h b/libkd/kdint_ttype_d.h index e1c9fafd6..e2bf30a18 100644 --- a/libkd/kdint_ttype_d.h +++ b/libkd/kdint_ttype_d.h @@ -1,19 +1,6 @@ /* - This file is part of libkd. - Copyright 2006-2008 Dustin Lang and Keir Mierle. - - libkd 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, version 2. - - libkd 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 libkd; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of libkd. +# Licensed under a 3-clause BSD style license - see LICENSE */ typedef double ttype; diff --git a/libkd/kdint_ttype_f.h b/libkd/kdint_ttype_f.h index cc9791f2c..c40a5886d 100644 --- a/libkd/kdint_ttype_f.h +++ b/libkd/kdint_ttype_f.h @@ -1,19 +1,6 @@ /* - This file is part of libkd. - Copyright 2006-2008 Dustin Lang and Keir Mierle. - - libkd 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, version 2. - - libkd 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 libkd; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of libkd. +# Licensed under a 3-clause BSD style license - see LICENSE */ typedef float ttype; diff --git a/libkd/kdint_ttype_s.h b/libkd/kdint_ttype_s.h index cce41996c..2854bb39a 100644 --- a/libkd/kdint_ttype_s.h +++ b/libkd/kdint_ttype_s.h @@ -1,19 +1,6 @@ /* - This file is part of libkd. - Copyright 2006-2008 Dustin Lang and Keir Mierle. - - libkd 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, version 2. - - libkd 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 libkd; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of libkd. +# Licensed under a 3-clause BSD style license - see LICENSE */ typedef u16 ttype; diff --git a/libkd/kdint_ttype_u.h b/libkd/kdint_ttype_u.h index db2919d38..1c25afbd4 100644 --- a/libkd/kdint_ttype_u.h +++ b/libkd/kdint_ttype_u.h @@ -1,19 +1,6 @@ /* - This file is part of libkd. - Copyright 2006-2008 Dustin Lang and Keir Mierle. - - libkd 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, version 2. - - libkd 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 libkd; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of libkd. +# Licensed under a 3-clause BSD style license - see LICENSE */ typedef u32 ttype; diff --git a/libkd/kdtree.c b/libkd/kdtree.c index d89ab56fb..97e820d02 100644 --- a/libkd/kdtree.c +++ b/libkd/kdtree.c @@ -1,19 +1,6 @@ /* - This file is part of libkd. - Copyright 2006-2008 Dustin Lang and Keir Mierle. - - libkd 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, version 2. - - libkd 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 libkd; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of libkd. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/libkd/kdtree_dim.c b/libkd/kdtree_dim.c index 6d4b4e516..f5e4d872b 100644 --- a/libkd/kdtree_dim.c +++ b/libkd/kdtree_dim.c @@ -1,19 +1,6 @@ /* - This file is part of libkd. - Copyright 2006-2008 Dustin Lang and Keir Mierle. - - libkd 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, version 2. - - libkd 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 libkd; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of libkd. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/libkd/kdtree_fits_io.c b/libkd/kdtree_fits_io.c index 687705e06..adbf78a1c 100644 --- a/libkd/kdtree_fits_io.c +++ b/libkd/kdtree_fits_io.c @@ -1,19 +1,6 @@ /* - This file is part of libkd. - Copyright 2006-2009 Dustin Lang and Keir Mierle. - - libkd 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, version 2. - - libkd 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 libkd; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of libkd. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/libkd/kdtree_internal.c b/libkd/kdtree_internal.c index b48ac3c0f..2b91c00fe 100644 --- a/libkd/kdtree_internal.c +++ b/libkd/kdtree_internal.c @@ -1,20 +1,6 @@ /* - This file is part of libkd. - Copyright 2006-2008 Dustin Lang and Keir Mierle. - Copyright 2014 Dustin Lang. - - libkd 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, version 2. - - libkd 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 libkd; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of libkd. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/libkd/kdtree_internal.h b/libkd/kdtree_internal.h index e1035f585..77db96485 100644 --- a/libkd/kdtree_internal.h +++ b/libkd/kdtree_internal.h @@ -1,19 +1,6 @@ /* - This file is part of libkd. - Copyright 2006-2008 Dustin Lang and Keir Mierle. - - libkd 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, version 2. - - libkd 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 libkd; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of libkd. +# Licensed under a 3-clause BSD style license - see LICENSE */ #ifndef KDTREE_INTERNAL_H diff --git a/libkd/kdtree_internal_common.h b/libkd/kdtree_internal_common.h index 060835668..b214b8ea9 100644 --- a/libkd/kdtree_internal_common.h +++ b/libkd/kdtree_internal_common.h @@ -1,19 +1,6 @@ /* - This file is part of libkd. - Copyright 2006-2008 Dustin Lang and Keir Mierle. - - libkd 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, version 2. - - libkd 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 libkd; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of libkd. +# Licensed under a 3-clause BSD style license - see LICENSE */ #define DIST_SCALE( kd, rd) ((rd) * (kd)->scale) diff --git a/libkd/kdtree_internal_dists.c b/libkd/kdtree_internal_dists.c index e9216808e..eb202b165 100644 --- a/libkd/kdtree_internal_dists.c +++ b/libkd/kdtree_internal_dists.c @@ -1,19 +1,6 @@ /* - This file is part of libkd. - Copyright 2006-2008 Dustin Lang and Keir Mierle. - - libkd 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, version 2. - - libkd 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 libkd; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of libkd. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include "keywords.h" diff --git a/libkd/kdtree_internal_dualtree.c b/libkd/kdtree_internal_dualtree.c index 9b6157c98..4a39a07a0 100644 --- a/libkd/kdtree_internal_dualtree.c +++ b/libkd/kdtree_internal_dualtree.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2009 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of libkd. +# Licensed under a 3-clause BSD style license - see LICENSE */ #ifndef KDTREE_NO_DUALTREE diff --git a/libkd/kdtree_internal_fits.c b/libkd/kdtree_internal_fits.c index 7cb771869..076877b04 100644 --- a/libkd/kdtree_internal_fits.c +++ b/libkd/kdtree_internal_fits.c @@ -1,19 +1,6 @@ /* - This file is part of libkd. - Copyright 2006-2008 Dustin Lang and Keir Mierle. - - libkd 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, version 2. - - libkd 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 libkd; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of libkd. +# Licensed under a 3-clause BSD style license - see LICENSE */ #ifndef KDTREE_NO_FITS diff --git a/libkd/kdtree_mem.c b/libkd/kdtree_mem.c index 71e397ee7..20fe93cce 100644 --- a/libkd/kdtree_mem.c +++ b/libkd/kdtree_mem.c @@ -1,19 +1,6 @@ /* - This file is part of libkd. - Copyright 2007 Dustin Lang and Keir Mierle. - - libkd 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, version 2. - - libkd 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 libkd; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of libkd. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/libkd/kdtree_mem.h b/libkd/kdtree_mem.h index 59fa401f8..991a5576e 100644 --- a/libkd/kdtree_mem.h +++ b/libkd/kdtree_mem.h @@ -1,19 +1,6 @@ /* - This file is part of libkd. - Copyright 2007 Dustin Lang and Keir Mierle. - - libkd 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, version 2. - - libkd 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 libkd; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of libkd. +# Licensed under a 3-clause BSD style license - see LICENSE */ #ifndef KDTREE_MEM_H diff --git a/libkd/pyspherematch.c b/libkd/pyspherematch.c index ee2d85084..2cf076be8 100644 --- a/libkd/pyspherematch.c +++ b/libkd/pyspherematch.c @@ -1,19 +1,6 @@ /* - This file is part of libkd. - Copyright 2008, 2009, 2010, 2011, 2013 Dustin Lang. - - libkd 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, version 2. - - libkd 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 libkd; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of libkd. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include "Python.h" diff --git a/libkd/qptst.c b/libkd/qptst.c index 9d7f652a1..3b8aae667 100644 --- a/libkd/qptst.c +++ b/libkd/qptst.c @@ -1,19 +1,6 @@ /* - This file is part of libkd. - Copyright 2006-2008 Dustin Lang and Keir Mierle. - - libkd 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, version 2. - - libkd 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 libkd; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of libkd. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/libkd/setup-min.py b/libkd/setup-min.py index aacf5a54f..f99cf83d7 100644 --- a/libkd/setup-min.py +++ b/libkd/setup-min.py @@ -1,3 +1,5 @@ +# This file is part of libkd. +# Licensed under a 3-clause BSD style license - see LICENSE from distutils.core import setup, Extension import numpy import os.path diff --git a/libkd/setup.py b/libkd/setup.py index 90ff10e39..0fe2ea8d8 100644 --- a/libkd/setup.py +++ b/libkd/setup.py @@ -1,3 +1,5 @@ +# This file is part of libkd. +# Licensed under a 3-clause BSD style license - see LICENSE from distutils.core import setup, Extension import numpy import os.path diff --git a/libkd/spherematch.py b/libkd/spherematch.py index 611ef6a5f..d7ca37f59 100644 --- a/libkd/spherematch.py +++ b/libkd/spherematch.py @@ -1,7 +1,7 @@ -#from astrometry.libkd import spherematch_c +# This file is part of libkd. +# Licensed under a 3-clause BSD style license - see LICENSE from . import spherematch_c -#from astrometry.util.starutil_numpy import radectoxyz, deg2dist, dist2deg, distsq2deg from ..util.starutil_numpy import radectoxyz, deg2dist, dist2deg, distsq2deg import numpy as np diff --git a/libkd/test-quickselect.c b/libkd/test-quickselect.c index 2849a29c6..156cd1c9c 100644 --- a/libkd/test-quickselect.c +++ b/libkd/test-quickselect.c @@ -1,3 +1,7 @@ +/* +# This file is part of libkd. +# Licensed under a 3-clause BSD style license - see LICENSE + */ #include #include #include diff --git a/libkd/test_dualtree_nn.c b/libkd/test_dualtree_nn.c index 587fc1a1e..9a8d786c7 100644 --- a/libkd/test_dualtree_nn.c +++ b/libkd/test_dualtree_nn.c @@ -1,20 +1,7 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2008 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ +# This file is part of libkd. +# Licensed under a 3-clause BSD style license - see LICENSE + */ #include #include diff --git a/libkd/test_libkd.c b/libkd/test_libkd.c index 16b0dd0ba..bf24ca4f1 100644 --- a/libkd/test_libkd.c +++ b/libkd/test_libkd.c @@ -1,20 +1,7 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2007, 2008 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ +# This file is part of libkd. +# Licensed under a 3-clause BSD style license - see LICENSE + */ #include #include diff --git a/libkd/test_libkd_common.c b/libkd/test_libkd_common.c index 4c48d9ce7..ea5f778ef 100644 --- a/libkd/test_libkd_common.c +++ b/libkd/test_libkd_common.c @@ -1,20 +1,7 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2008 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ +# This file is part of libkd. +# Licensed under a 3-clause BSD style license - see LICENSE + */ static kdtree_t* build_tree(CuTest* tc, double* data, int N, int D, int Nleaf, int treetype, int treeopts); diff --git a/libkd/test_libkd_io.c b/libkd/test_libkd_io.c index 689cbe6ff..e98b88794 100644 --- a/libkd/test_libkd_io.c +++ b/libkd/test_libkd_io.c @@ -1,20 +1,7 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2008 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -*/ +# This file is part of libkd. +# Licensed under a 3-clause BSD style license - see LICENSE + */ #include #include diff --git a/libkd/test_spherematch.py b/libkd/test_spherematch.py index 0e100b615..0a9c2b963 100644 --- a/libkd/test_spherematch.py +++ b/libkd/test_spherematch.py @@ -1,3 +1,5 @@ +# This file is part of libkd. +# Licensed under a 3-clause BSD style license - see LICENSE from astrometry.libkd import spherematch import numpy as np from time import time diff --git a/sdss/Makefile b/sdss/Makefile index 37f753e2f..847bfc3ae 100644 --- a/sdss/Makefile +++ b/sdss/Makefile @@ -1,3 +1,5 @@ +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE all: BASEDIR := .. diff --git a/sdss/__init__.py b/sdss/__init__.py index 33bdae239..92066c56c 100644 --- a/sdss/__init__.py +++ b/sdss/__init__.py @@ -1,3 +1,5 @@ +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE from .dr7 import DR7 from .dr8 import DR8 from .dr9 import DR9 diff --git a/sdss/common.py b/sdss/common.py index d9e18cb5d..2f69ce17d 100644 --- a/sdss/common.py +++ b/sdss/common.py @@ -1,3 +1,5 @@ +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE from __future__ import print_function import os from astrometry.util.fits import fits_table diff --git a/sdss/cutils.i b/sdss/cutils.i index 62cda4704..9331e052a 100644 --- a/sdss/cutils.i +++ b/sdss/cutils.i @@ -1,3 +1,7 @@ +/* +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE + */ %module cutils %{ diff --git a/sdss/cutout.py b/sdss/cutout.py index fe7e9ffb8..900a37fdd 100644 --- a/sdss/cutout.py +++ b/sdss/cutout.py @@ -1,3 +1,5 @@ +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE import numpy as np from scipy.ndimage.filters import gaussian_filter diff --git a/sdss/dr10.py b/sdss/dr10.py index 4d0b56247..efdc31a96 100644 --- a/sdss/dr10.py +++ b/sdss/dr10.py @@ -1,3 +1,5 @@ +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE import os try: import pyfits @@ -11,7 +13,6 @@ from common import * from dr9 import * -from astrometry.util.yanny import * class DR10(DR9): diff --git a/sdss/dr7.py b/sdss/dr7.py index 95f3362e8..4c0293a79 100644 --- a/sdss/dr7.py +++ b/sdss/dr7.py @@ -1,3 +1,5 @@ +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE import os from .common import * diff --git a/sdss/dr8.py b/sdss/dr8.py index 18a3aef0e..008b02da3 100644 --- a/sdss/dr8.py +++ b/sdss/dr8.py @@ -1,3 +1,5 @@ +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE import os from astrometry.util.fits import fits_table import numpy as np @@ -19,7 +21,7 @@ from common import * from dr7 import * -from astrometry.util.yanny import * +from yanny import * from astrometry.util.run_command import run_command class Frame(SdssFile): diff --git a/sdss/dr9.py b/sdss/dr9.py index 5d4daa3e9..4dd067be8 100644 --- a/sdss/dr9.py +++ b/sdss/dr9.py @@ -1,3 +1,5 @@ +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE import os try: import pyfits @@ -11,7 +13,6 @@ from common import * from dr8 import * -from astrometry.util.yanny import * class DR9(DR8): diff --git a/sdss/fields.py b/sdss/fields.py index 03b22198d..e81af8aa6 100755 --- a/sdss/fields.py +++ b/sdss/fields.py @@ -1,4 +1,6 @@ #! /usr/bin/env python +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE from astrometry.util.fits import * from astrometry.util.starutil_numpy import * diff --git a/util/sdss_das.py b/sdss/sdss_das.py similarity index 100% rename from util/sdss_das.py rename to sdss/sdss_das.py diff --git a/util/sdss_name.py b/sdss/sdss_name.py similarity index 100% rename from util/sdss_name.py rename to sdss/sdss_name.py diff --git a/sdss/setup.py b/sdss/setup.py index 99a5dda4e..d6f689906 100644 --- a/sdss/setup.py +++ b/sdss/setup.py @@ -1,3 +1,5 @@ +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE from distutils.core import setup, Extension import os import sys diff --git a/util/sqlcl.py b/sdss/sqlcl.py similarity index 100% rename from util/sqlcl.py rename to sdss/sqlcl.py diff --git a/sdss/test_dr7.py b/sdss/test_dr7.py index 17f4f97c6..6f46e85f1 100644 --- a/sdss/test_dr7.py +++ b/sdss/test_dr7.py @@ -1,3 +1,5 @@ +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE import os from math import sqrt diff --git a/sdss/test_dr8.py b/sdss/test_dr8.py index 44012b5a5..f3b34be3e 100644 --- a/sdss/test_dr8.py +++ b/sdss/test_dr8.py @@ -1,3 +1,5 @@ +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE import matplotlib matplotlib.use('Agg') import pylab as plt diff --git a/sdss/test_psf.py b/sdss/test_psf.py index a433d424b..9de88b38e 100644 --- a/sdss/test_psf.py +++ b/sdss/test_psf.py @@ -1,3 +1,5 @@ +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE import matplotlib matplotlib.use('Agg') import pylab as plt diff --git a/util/yanny.py b/sdss/yanny.py similarity index 100% rename from util/yanny.py rename to sdss/yanny.py diff --git a/util/2mass_get.py b/util/2mass_get.py index 4d9465531..fc5d63e94 100755 --- a/util/2mass_get.py +++ b/util/2mass_get.py @@ -1,4 +1,5 @@ #! /usr/bin/env python +# Licensed under a 3-clause BSD style license - see LICENSE import re import sys import socket diff --git a/util/EXIF.py b/util/EXIF.py index ed4192af8..1805149d4 100755 --- a/util/EXIF.py +++ b/util/EXIF.py @@ -2,7 +2,7 @@ # -*- coding: utf-8 -*- # # Library to extract EXIF information from digital camera image files -# http://sourceforge.net/projects/exif-py/ +# https://github.com/ianare/exif-py # # VERSION 1.1.0 # diff --git a/util/Makefile b/util/Makefile index b3a0b6444..aca6ab997 100644 --- a/util/Makefile +++ b/util/Makefile @@ -1,19 +1,5 @@ # This file is part of the Astrometry.net suite. -# Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. -# Copyright 2008, 2009, 2010, 2011, 2012 Dustin Lang. -# -# The Astrometry.net suite 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, version 2. -# -# The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# Licensed under a 3-clause BSD style license - see LICENSE BASEDIR := .. COMMON := . @@ -37,7 +23,7 @@ SO=$(SHAREDLIB_SUFFIX) ANBASE_OBJ := starutil.o mathutil.o bl-sort.o bl.o bt.o healpix-utils.o \ healpix.o permutedsort.o ioutils.o fileutils.o md5.o \ os-features.o an-endian.o errors.o an-opts.o tic.o log.o datalog.o \ - sparsematrix.o lsqr.o coadd.o convolve-image.o resample.o \ + sparsematrix.o coadd.o convolve-image.o resample.o \ intmap.o histogram.o histogram2d.o ANBASE_DEPS := diff --git a/util/addpath.py b/util/addpath.py index 1c7d95ef6..c116282af 100644 --- a/util/addpath.py +++ b/util/addpath.py @@ -1,3 +1,5 @@ +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE import sys import os diff --git a/util/an-endian.c b/util/an-endian.c index f3097149e..57475ab16 100644 --- a/util/an-endian.c +++ b/util/an-endian.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2008 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include "an-endian.h" diff --git a/util/an-fitstopnm.c b/util/an-fitstopnm.c index c737beb2c..13540fcc9 100644 --- a/util/an-fitstopnm.c +++ b/util/an-fitstopnm.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/util/an-opts.c b/util/an-opts.c index 80269dff3..dc4d1997c 100644 --- a/util/an-opts.c +++ b/util/an-opts.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2008 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/util/an-pnmtofits.c b/util/an-pnmtofits.c index 5c6fef743..df7731f35 100644 --- a/util/an-pnmtofits.c +++ b/util/an-pnmtofits.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2010, 2012 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/util/an_build_ext.py b/util/an_build_ext.py index ee6b3edd0..514320837 100644 --- a/util/an_build_ext.py +++ b/util/an_build_ext.py @@ -1,3 +1,5 @@ +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE from distutils.command.build_ext import build_ext # as _build_py #from distutils.command import build_ext as _build_ext from distutils.dep_util import newer_group, newer diff --git a/util/anwcs.c b/util/anwcs.c index e85f1d96e..f03c51fdd 100644 --- a/util/anwcs.c +++ b/util/anwcs.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2010, 2012 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/util/bl-nl-sort.c b/util/bl-nl-sort.c index 91a57a324..2dedd7fd6 100644 --- a/util/bl-nl-sort.c +++ b/util/bl-nl-sort.c @@ -1,3 +1,7 @@ +/* +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE + */ static int NLF(compare_ascending)(const void* v1, const void* v2) { number i1 = *(number*)v1; number i2 = *(number*)v2; diff --git a/util/bl-nl.c b/util/bl-nl.c index 2935c586f..c26f86fc9 100644 --- a/util/bl-nl.c +++ b/util/bl-nl.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2009 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ /** diff --git a/util/bl-sort.c b/util/bl-sort.c index a133e1242..fffd83f8f 100644 --- a/util/bl-sort.c +++ b/util/bl-sort.c @@ -1,20 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006-2009 Dustin Lang, Keir Mierle and Sam Roweis. - Copyright 2014 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include "bl-sort.h" diff --git a/util/bl.c b/util/bl.c index ddb8472eb..e555a3016 100644 --- a/util/bl.c +++ b/util/bl.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006-2009 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/util/boilerplate.h b/util/boilerplate.h index 17763a697..79b1056ab 100644 --- a/util/boilerplate.h +++ b/util/boilerplate.h @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #ifndef BOILERPLATE_H diff --git a/util/bt.c b/util/bt.c index 3622b1c7e..10bea887e 100644 --- a/util/bt.c +++ b/util/bt.c @@ -1,19 +1,9 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + The AVL tree portion of this code was adapted from GNU libavl, + licensed under the GPL. */ #include diff --git a/util/cairoutils.c b/util/cairoutils.c index 39ca119ec..3bc19a348 100644 --- a/util/cairoutils.c +++ b/util/cairoutils.c @@ -1,20 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2007 Dustin Lang, Keir Mierle and Sam Roweis. - Copyright 2012 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/util/casjobs.py b/util/casjobs.py index b750f7e03..b71313d00 100755 --- a/util/casjobs.py +++ b/util/casjobs.py @@ -1,4 +1,6 @@ #! /usr/bin/env python +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE import sys import httplib diff --git a/util/celestial_mechanics.py b/util/celestial_mechanics.py index 797a1db9e..52f7d5c90 100644 --- a/util/celestial_mechanics.py +++ b/util/celestial_mechanics.py @@ -2,8 +2,8 @@ # celestial mechanics utilities for exoplanet ephemerides # # intellectual property: -# Copyright 2009 David W. Hogg. All rights reserved. Watch this space -# for an open-source license to be inserted later. +# Copyright 2009 David W. Hogg. All rights reserved. +# Licensed under a 3-clause BSD style license - see LICENSE # # comments: # - Written for clarity, not speed. The code is intended to be human- diff --git a/util/cfitsutils.h b/util/cfitsutils.h index a6a2aafe9..63f14adf5 100644 --- a/util/cfitsutils.h +++ b/util/cfitsutils.h @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2009 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #ifndef CFITSIO_UTILS_H diff --git a/util/clipper.py b/util/clipper.py deleted file mode 100755 index f04cfc436..000000000 --- a/util/clipper.py +++ /dev/null @@ -1,2274 +0,0 @@ -#=============================================================================== -# # -# Author : Angus Johnson # -# Version : 5.1.6 # -# Date : 23 May 2013 # -# Website : http://www.angusj.com # -# Copyright : Angus Johnson 2010-2013 # -# # -# License: # -# Use, modification & distribution is subject to Boost Software License Ver 1. # -# http://www.boost.org/LICENSE_1_0.txt # -# # -# Attributions: # -# The code in this library is an extension of Bala Vatti's clipping algorithm: # -# "A generic solution to polygon clipping" # -# Communications of the ACM, Vol 35, Issue 7 (July 1992) PP 56-63. # -# http://portal.acm.org/citation.cfm?id=129906 # -# # -# Computer graphics and geometric modeling: implementation and algorithms # -# By Max K. Agoston # -# Springer; 1 edition (January 4, 2005) # -# http://books.google.com/books?q=vatti+clipping+agoston # -# # -# See also: # -# "Polygon Offsetting by Computing Winding Numbers" # -# Paper no. DETC2005-85513 PP. 565-575 # -# ASME 2005 International Design Engineering Technical Conferences # -# and Computers and Information in Engineering Conference (IDETC/CIE2005) # -# September 24-28, 2005 , Long Beach, California, USA # -# http://www.me.berkeley.edu/~mcmains/pubs/DAC05OffsetPolygon.pdf # -# # -#=============================================================================== - -import math -from collections import namedtuple -from decimal import Decimal, getcontext - -getcontext().prec = 8 -horizontal = Decimal('-Infinity') - -class ClipType: (Intersection, Union, Difference, Xor) = range(4) -class PolyType: (Subject, Clip) = range(2) -class PolyFillType: (EvenOdd, NonZero, Positive, Negative) = range(4) -class JoinType: (Square, Round, Miter) = range(3) -class EndType: (Closed, Butt, Square, Round) = range(4) -class EdgeSide: (Left, Right) = range(2) -class Protects: (Neither, Left, Right, Both) = range(4) -class Direction: (LeftToRight, RightToLeft) = range(2) - -Point = namedtuple('Point', 'x y') -DoublePoint = namedtuple('DoublePoint', 'x y') - -class LocalMinima(object): - leftBound = rightBound = nextLm = None - def __init__(self, y, leftBound, rightBound): - self.y = y - self.leftBound = leftBound - self.rightBound = rightBound - -class Scanbeam(object): - __slots__ = ('y','nextSb') - def __init__(self, y, nextSb = None): - self.y = y - self.nextSb = nextSb - def __repr__(self): - s = 'None' - if self.nextSb is not None: s = '' - return "(y:%i, nextSb:%s)" % (self.y, s) - -class IntersectNode(object): - __slots__ = ('e1','e2','pt','nextIn') - def __init__(self, e1, e2, pt): - self.e1 = e1 - self.e2 = e2 - self.pt = pt - self.nextIn = None - -class OutPt(object): - __slots__ = ('idx','pt','prevOp','nextOp') - def __init__(self, idx, pt): - self.idx = idx - self.pt = pt - self.prevOp = None - self.nextOp = None - -class OutRec(object): - __slots__ = ('idx','bottomPt','isHole','FirstLeft', 'pts','PolyNode') - def __init__(self, idx): - self.idx = idx - self.bottomPt = None - self.isHole = False - self.FirstLeft = None - self.pts = None - self.PolyNode = None - -class JoinRec(object): - __slots__ = ('pt1a','pt1b','poly1Idx','pt2a', 'pt2b','poly2Idx') - -class HorzJoin(object): - edge = None - savedIdx = 0 - prevHj = None - nextHj = None - def __init__(self, edge, idx): - self.edge = edge - self.savedIdx = idx - -#=============================================================================== -# Unit global functions ... -#=============================================================================== -def IntsToPoints(ints): - result = [] - for i in range(0, len(ints), 2): - result.append(Point(ints[i], ints[i+1])) - return result - -def Area(polygon): - # see http://www.mathopenref.com/coordpolygonarea2.html - highI = len(polygon) - 1 - A = (polygon[highI].x + polygon[0].x) * (polygon[0].y - polygon[highI].y) - for i in range(highI): - A += (polygon[i].x + polygon[i+1].x) * (polygon[i+1].y - polygon[i].y) - return float(A) / 2 - -def Orientation(polygon): - return Area(polygon) > 0.0 - -#=============================================================================== -# PolyNode & PolyTree classes (+ ancilliary functions) -#=============================================================================== -class PolyNode(object): - """Node of PolyTree""" - - def __init__(self): - self.Contour = [] - self.Childs = [] - self.Parent = None - self.Index = 0 - self.ChildCount = 0 - - def IsHole(self): - result = True - while (self.Parent is not None): - result = not result - self.Parent = self.Parent.Parent - return result - - def GetNext(self): - if (self.ChildCount > 0): - return self.Childs[0] - else: - return self._GetNextSiblingUp() - - def _AddChild(self, node): - self.Childs.append(node) - node.Index = self.ChildCount - node.Parent = self - self.ChildCount += 1 - - def _GetNextSiblingUp(self): - if (self.Parent is None): - return None - elif (self.Index == self.Parent.ChildCount - 1): - return self.Parent._GetNextSiblingUp() - else: - return self.Parent.Childs[self.Index +1] - -class PolyTree(PolyNode): - """Container for PolyNodes""" - - def __init__(self): - PolyNode.__init__(self) - self._AllNodes = [] - - def Clear(self): - self._AllNodes = [] - self.Childs = [] - self.ChildCount = 0 - - def GetFirst(self): - if (self.ChildCount > 0): - return self.Childs[0] - else: - return None - - def Total(self): - return len(self._AllNodes) - -def _AddPolyNodeToPolygons(polynode, polygons): - """Internal function for PolyTreeToPolygons()""" - if (len(polynode.Contour) > 0): - polygons.append(polynode.Contour) - for i in range(polynode.ChildCount): - _AddPolyNodeToPolygons(polynode.Childs[i], polygons) - -def PolyTreeToPolygons(polyTree): - result = [] - _AddPolyNodeToPolygons(polyTree, result) - return result - -#=============================================================================== -# Edge class -#=============================================================================== - -class Edge(object): - - def __init__(self): - self.xBot, self.yBot, self.xCurr, self.yCurr, = 0, 0, 0, 0 - self.xTop, self.yTop = 0, 0 - self.dx, self.deltaX , self.deltaY = Decimal(0), Decimal(0), Decimal(0) - self.polyType = PolyType.Subject - self.side = EdgeSide.Left - self.windDelta, self.windCnt, self.windCnt2 = 0, 0, 0 - self.outIdx = -1 - self.nextE, self.prevE, self.nextInLML = None, None, None - self.prevInAEL, self.nextInAEL, self.prevInSEL, self.nextInSEL = None, None, None, None - - def __repr__(self): - return "(%i,%i . %i,%i {dx:%0.2f} %i {%x})" % \ - (self.xBot, self.yBot, self.xTop, self.yTop, self.dx, self.outIdx, id(self)) - -#=============================================================================== -# ClipperBase class (+ data structs & ancilliary functions) -#=============================================================================== - -def _PointsEqual(pt1, pt2): - return (pt1.x == pt2.x) and (pt1.y == pt2.y) - -def _SlopesEqual(pt1, pt2, pt3, pt4 = None): - if pt4 is None: - return (pt1.y-pt2.y)*(pt2.x-pt3.x) == (pt1.x-pt2.x)*(pt2.y-pt3.y) - else: - return (pt1.y-pt2.y)*(pt3.x-pt4.x) == (pt1.x-pt2.x)*(pt3.y-pt4.y) - -def _SlopesEqual2(e1, e2): - return e1.deltaY * e2.deltaX == e1.deltaX * e2.deltaY - -def _SetDx(e): - e.deltaX = Decimal(e.xTop - e.xBot) - e.deltaY = Decimal(e.yTop - e.yBot) - if e.deltaY == 0: e.dx = horizontal - else: e.dx = e.deltaX/e.deltaY - -def _SwapSides(e1, e2): - side = e1.side - e1.side = e2.side - e2.side = side - -def _SwapPolyIndexes(e1, e2): - idx = e1.outIdx - e1.outIdx = e2.outIdx - e2.outIdx = idx - -def _InitEdge(e, eNext, ePrev, pt, polyType): - e.nextE = eNext - e.prevE = ePrev - e.xCurr = pt.x - e.yCurr = pt.y - if e.yCurr >= e.nextE.yCurr: - e.xBot = e.xCurr - e.yBot = e.yCurr - e.xTop = e.nextE.xCurr - e.yTop = e.nextE.yCurr - e.windDelta = 1 - else: - e.xTop = e.xCurr - e.yTop = e.yCurr - e.xBot = e.nextE.xCurr - e.yBot = e.nextE.yCurr - e.windDelta = -1 - _SetDx(e) - e.outIdx = -1 - e.PolyType = polyType - -def _SwapX(e): - e.xCurr = e.xTop - e.xTop = e.xBot - e.xBot = e.xCurr - -class ClipperBase(object): - - def __init__(self): - self._EdgeList = [] # 2D array - self._LocalMinList = None # single-linked list of LocalMinima - self._CurrentLocMin = None - - def _InsertLocalMinima(self, lm): - if self._LocalMinList is None: - self._LocalMinList = lm - elif lm.y >= self._LocalMinList.y: - lm.nextLm = self._LocalMinList - self._LocalMinList = lm - else: - tmp = self._LocalMinList - while tmp.nextLm is not None and lm.y < tmp.nextLm.y: - tmp = tmp.nextLm - lm.nextLm = tmp.nextLm - tmp.nextLm = lm - - def _AddBoundsToLML(self, e): - e.nextInLML = None - e = e.nextE - while True: - if e.dx == horizontal: - if (e.nextE.yTop < e.yTop) and (e.nextE.xBot > e.prevE.xBot): break - if (e.xTop != e.prevE.xBot): _SwapX(e) - e.nextInLML = e.prevE - elif e.yBot == e.prevE.yBot: break - else: e.nextInLML = e.prevE - e = e.nextE - - if e.dx == horizontal: - if (e.xBot != e.prevE.xBot): _SwapX(e) - lm = LocalMinima(e.prevE.yBot, e.prevE, e) - elif (e.dx < e.prevE.dx): - lm = LocalMinima(e.prevE.yBot, e.prevE, e) - else: - lm = LocalMinima(e.prevE.yBot, e, e.prevE) - lm.leftBound.side = EdgeSide.Left - lm.rightBound.side = EdgeSide.Right - self._InsertLocalMinima(lm) - while True: - if e.nextE.yTop == e.yTop and e.nextE.dx != horizontal: break - e.nextInLML = e.nextE - e = e.nextE - if e.dx == horizontal and e.xBot != e.prevE.xTop: _SwapX(e) - return e.nextE - - def _Reset(self): - lm = self._LocalMinList - if lm is not None: self._CurrentLocMin = lm - while lm is not None: - e = lm.leftBound - while e is not None: - e.xCurr = e.xBot - e.yCurr = e.yBot - e.side = EdgeSide.Left - e.outIdx = -1 - e = e.nextInLML - e = lm.rightBound - while e is not None: - e.xCurr = e.xBot - e.yCurr = e.yBot - e.side = EdgeSide.Right - e.outIdx = -1 - e = e.nextInLML - lm = lm.nextLm - - def AddPolygon(self, polygon, polyType): - ln = len(polygon) - if ln < 3: return False - pg = polygon[:] - j = 0 - # remove duplicate points and co-linear points - for i in range(1, len(polygon)): - if _PointsEqual(pg[j], polygon[i]): - continue - elif (j > 0) and _SlopesEqual(pg[j-1], pg[j], polygon[i]): - if _PointsEqual(pg[j-1], polygon[i]): j -= 1 - else: j += 1 - pg[j] = polygon[i] - if (j < 2): return False - # remove duplicate points and co-linear edges at the loop around - # of the start and end coordinates ... - ln = j +1 - while (ln > 2): - if _PointsEqual(pg[j], pg[0]): j -= 1 - elif _PointsEqual(pg[0], pg[1]) or _SlopesEqual(pg[j], pg[0], pg[1]): - pg[0] = pg[j] - j -= 1 - elif _SlopesEqual(pg[j-1], pg[j], pg[0]): j -= 1 - elif _SlopesEqual(pg[0], pg[1], pg[2]): - for i in range(2, j +1): pg[i-1] = pg[i] - j -= 1 - else: break - ln -= 1 - if ln < 3: return False - edges = [] - for i in range(ln): - edges.append(Edge()) - edges[0].xCurr = pg[0].x - edges[0].yCurr = pg[0].y - _InitEdge(edges[ln-1], edges[0], edges[ln-2], pg[ln-1], polyType) - for i in range(ln-2, 0, -1): - _InitEdge(edges[i], edges[i+1], edges[i-1], pg[i], polyType) - _InitEdge(edges[0], edges[1], edges[ln-1], pg[0], polyType) - e = edges[0] - eHighest = e - while True: - e.xCurr = e.xBot - e.yCurr = e.yBot - if e.yTop < eHighest.yTop: eHighest = e - e = e.nextE - if e == edges[0]: break - # make sure eHighest is positioned so the following loop works safely ... - if eHighest.windDelta > 0: eHighest = eHighest.nextE - if eHighest.dx == horizontal: eHighest = eHighest.nextE - # finally insert each local minima ... - e = eHighest - while True: - e = self._AddBoundsToLML(e) - if e == eHighest: break - self._EdgeList.append(edges) - - def AddPolygons(self, polygons, polyType): - result = False - for p in polygons: - if self.AddPolygon(p, polyType): result = True - return result - - def Clear(self): - self._EdgeList = [] - self._LocalMinList = None - self._CurrentLocMin = None - - def _PopLocalMinima(self): - if self._CurrentLocMin is not None: - self._CurrentLocMin = self._CurrentLocMin.nextLm - -#=============================================================================== -# Clipper class (+ data structs & ancilliary functions) -#=============================================================================== -def _IntersectPoint(edge1, edge2): - if _SlopesEqual2(edge1, edge2): - if (edge2.ybot > edge1.ybot): y = edge2.ybot - else: y = edge1.ybot - return Point(0, y), False - if edge1.dx == 0: - x = edge1.xBot - if edge2.dx == horizontal: - y = edge2.yBot - else: - b2 = edge2.yBot - Decimal(edge2.xBot)/edge2.dx - y = round(Decimal(x)/edge2.dx + b2) - elif edge2.dx == 0: - x = edge2.xBot - if edge1.dx == horizontal: - y = edge1.yBot - else: - b1 = edge1.yBot - Decimal(edge1.xBot)/edge1.dx - y = round(Decimal(x)/edge1.dx + b1) - else: - b1 = edge1.xBot - edge1.yBot * edge1.dx - b2 = edge2.xBot - edge2.yBot * edge2.dx - m = Decimal(b2-b1)/(edge1.dx - edge2.dx) - y = round(m) - if math.fabs(edge1.dx) < math.fabs(edge2.dx): - x = round(edge1.dx * m + b1) - else: - x = round(edge2.dx * m + b2) - if (y < edge1.yTop) or (y < edge2.yTop): - if (edge1.yTop > edge2.yTop): - return Point(edge1.xTop,edge1.yTop), _TopX(edge2, edge1.yTop) < edge1.xTop - else: - return Point(edge2.xTop,edge2.yTop), _TopX(edge1, edge2.yTop) > edge2.xTop - else: - return Point(x,y), True - -def _TopX(e, currentY): - if currentY == e.yTop: return e.xTop - elif e.xTop == e.xBot: return e.xBot - else: return e.xBot + round(e.dx * Decimal(currentY - e.yBot)) - -def _E2InsertsBeforeE1(e1,e2): - if (e2.xCurr == e1.xCurr): - if (e2.yTop > e1.yTop): - return e2.xTop < _TopX(e1, e2.yTop) - return e1.xTop > _TopX(e2, e1.yTop) - else: - return e2.xCurr < e1.xCurr - -def _IsMinima(e): - return e is not None and e.prevE.nextInLML != e and e.nextE.nextInLML != e - -def _IsMaxima(e, y): - return e is not None and e.yTop == y and e.nextInLML is None - -def _IsIntermediate(e, y): - return e.yTop == y and e.nextInLML is not None - -def _GetMaximaPair(e): - if not _IsMaxima(e.nextE, e.yTop) or e.nextE.xTop != e.xTop: - return e.prevE - else: - return e.nextE - -def _GetnextInAEL(e, direction): - if direction == Direction.LeftToRight: return e.nextInAEL - else: return e.prevInAEL - -def _ProtectLeft(val): - if val: return Protects.Both - else: return Protects.Right - -def _ProtectRight(val): - if val: return Protects.Both - else: return Protects.Left - -def _GetDx(pt1, pt2): - if (pt1.y == pt2.y): return horizontal - else: return Decimal(pt2.x - pt1.x)/(pt2.y - pt1.y) - -def _Param1RightOfParam2(outRec1, outRec2): - while outRec1 is not None: - outRec1 = outRec1.FirstLeft - if outRec1 == outRec2: return True - return False - -def _FirstParamIsbottomPt(btmPt1, btmPt2): - p = btmPt1.prevOp - while _PointsEqual(p.pt, btmPt1.pt) and (p != btmPt1): p = p.prevOp - dx1p = abs(_GetDx(btmPt1.pt, p.pt)) - p = btmPt1.nextOp - while _PointsEqual(p.pt, btmPt1.pt) and (p != btmPt1): p = p.nextOp - dx1n = abs(_GetDx(btmPt1.pt, p.pt)) - - p = btmPt2.prevOp - while _PointsEqual(p.pt, btmPt2.pt) and (p != btmPt2): p = p.prevOp - dx2p = abs(_GetDx(btmPt2.pt, p.pt)) - p = btmPt2.nextOp - while _PointsEqual(p.pt, btmPt2.pt) and (p != btmPt2): p = p.nextOp - dx2n = abs(_GetDx(btmPt2.pt, p.pt)) - return (dx1p >= dx2p and dx1p >= dx2n) or (dx1n >= dx2p and dx1n >= dx2n) - -def _GetBottomPt(pp): - dups = None - p = pp.nextOp - while p != pp: - if p.pt.y > pp.pt.y: - pp = p - dups = None - elif p.pt.y == pp.pt.y and p.pt.x <= pp.pt.x: - if p.pt.x < pp.pt.x: - dups = None - pp = p - else: - if p.nextOp != pp and p.prevOp != pp: dups = p - p = p.nextOp - if dups is not None: - while dups != p: - if not _FirstParamIsbottomPt(p, dups): pp = dups - dups = dups.nextOp - while not _PointsEqual(dups.pt, pp.pt): dups = dups.nextOp - return pp - -def _GetLowermostRec(outRec1, outRec2): - if (outRec1.bottomPt is None): - outPt1 = _GetBottomPt(outRec1.pts) - else: outPt1 = outRec1.bottomPt - if (outRec2.bottomPt is None): - outPt2 = _GetBottomPt(outRec2.pts) - else: outPt2 = outRec2.bottomPt - if (outPt1.pt.y > outPt2.pt.y): return outRec1 - elif (outPt1.pt.y < outPt2.pt.y): return outRec2 - elif (outPt1.pt.x < outPt2.pt.x): return outRec1 - elif (outPt1.pt.x > outPt2.pt.x): return outRec2 - elif (outPt1.nextOp == outPt1): return outRec2 - elif (outPt2.nextOp == outPt2): return outRec1 - elif _FirstParamIsbottomPt(outPt1, outPt2): return outRec1 - else: return outRec2 - -def _SetHoleState(e, outRec, polyOutList): - isHole = False - e2 = e.prevInAEL - while e2 is not None: - if e2.outIdx >= 0: - isHole = not isHole - if outRec.FirstLeft is None: - outRec.FirstLeft = polyOutList[e2.outIdx] - e2 = e2.prevInAEL - outRec.isHole = isHole - -def _PointCount(pts): - if pts is None: return 0 - p = pts - result = 0 - while True: - result += 1 - p = p.nextOp - if p == pts: break - return result - -def _PointIsVertex(pt, outPts): - op = outPts - while True: - if _PointsEqual(op.pt, pt): return True - op = op.nextOp - if op == outPts: break - return False - -def _ReversePolyPtLinks(pp): - if pp is None: return - pp1 = pp - while True: - pp2 = pp1.nextOp - pp1.nextOp = pp1.prevOp - pp1.prevOp = pp2; - pp1 = pp2 - if pp1 == pp: break - -def _FixupOutPolygon(outRec): - lastOK = None - outRec.bottomPt = None - pp = outRec.pts - while True: - if pp.prevOp == pp or pp.nextOp == pp.prevOp: - outRec.pts = None - return - if _PointsEqual(pp.pt, pp.nextOp.pt) or \ - _SlopesEqual(pp.prevOp.pt, pp.pt, pp.nextOp.pt): - lastOK = None - pp.prevOp.nextOp = pp.nextOp - pp.nextOp.prevOp = pp.prevOp - pp = pp.prevOp - elif pp == lastOK: break - else: - if lastOK is None: lastOK = pp - pp = pp.nextOp - outRec.pts = pp - -def _FixHoleLinkage(outRec): - if outRec.FirstLeft is None or \ - (outRec.isHole != outRec.FirstLeft.isHole and \ - outRec.FirstLeft.pts is not None): return - orfl = outRec.FirstLeft - while orfl is not None and \ - (orfl.isHole == outRec.isHole or orfl.pts is None): - orfl = orfl.FirstLeft - outRec.FirstLeft = orfl - -def _GetOverlapSegment(pt1a, pt1b, pt2a, pt2b): - # precondition: segments are co-linear - if abs(pt1a.x - pt1b.x) > abs(pt1a.y - pt1b.y): - if pt1a.x > pt1b.x: tmp = pt1a; pt1a = pt1b; pt1b = tmp - if pt2a.x > pt2b.x: tmp = pt2a; pt2a = pt2b; pt2b = tmp - if (pt1a.x > pt2a.x): pt1 = pt1a - else: pt1 = pt2a - if (pt1b.x < pt2b.x): pt2 = pt1b - else: pt2 = pt2b - return pt1, pt2, pt1.x < pt2.x - else: - if pt1a.y < pt1b.y: tmp = pt1a; pt1a = pt1b; pt1b = tmp - if pt2a.y < pt2b.y: tmp = pt2a; pt2a = pt2b; pt2b = tmp - if (pt1a.y < pt2a.y): pt1 = pt1a - else: pt1 = pt2a - if (pt1b.y > pt2b.y): pt2 = pt1b - else: pt2 = pt2b - return pt1, pt2, pt1.y > pt2.y - - -def _FindSegment(outPt, pt1, pt2): - if outPt is None: return outPt, pt1, pt2, False - pt1a = pt1; pt2a = pt2 - outPt2 = outPt - while True: - if _SlopesEqual(pt1a, pt2a, outPt.pt, outPt.prevOp.pt) and _SlopesEqual(pt1a, pt2a, outPt.pt): - pt1, pt2, overlap = _GetOverlapSegment(pt1a, pt2a, outPt.pt, outPt.prevOp.pt) - if overlap: return outPt, pt1, pt2, True - outPt = outPt.nextOp - if outPt == outPt2: return outPt, pt1, pt2, False - -def _Pt3IsBetweenPt1AndPt2(pt1, pt2, pt3): - if _PointsEqual(pt1, pt3) or _PointsEqual(pt2, pt3): return True - elif pt1.x != pt2.x: return (pt1.x < pt3.x) == (pt3.x < pt2.x) - else: return (pt1.y < pt3.y) == (pt3.y < pt2.y) - -def _InsertPolyPtBetween(outPt1, outPt2, pt): - if outPt1 == outPt2: raise Exception("JoinError") - result = OutPt(outPt1.idx, pt) - if outPt2 == outPt1.nextOp: - outPt1.nextOp = result - outPt2.prevOp = result - result.nextOp = outPt2 - result.prevOp = outPt1 - else: - outPt2.nextOp = result - outPt1.prevOp = result - result.nextOp = outPt1 - result.prevOp = outPt2 - return result - -def _PointOnLineSegment(pt, linePt1, linePt2): - return ((pt.x == linePt1.x) and (pt.y == linePt1.y)) or \ - ((pt.x == linePt2.x) and (pt.y == linePt2.y)) or \ - (((pt.x > linePt1.x) == (pt.x < linePt2.x)) and \ - ((pt.y > linePt1.y) == (pt.y < linePt2.y)) and \ - ((pt.x - linePt1.x) * (linePt2.y - linePt1.y) == \ - (linePt2.x - linePt1.x) * (pt.y - linePt1.y))) - -def _PointOnPolygon(pt, pp): - pp2 = pp; - while True: - if (_PointOnLineSegment(pt, pp2.pt, pp2.nextOp.pt)): - return True - pp2 = pp2.nextOp - if (pp2 == pp): return False - -def _PointInPolygon(pt, outPt): - result = False - outPt2 = outPt - while True: - if ((((outPt2.pt.y <= pt.y) and (pt.y < outPt2.prevOp.pt.y)) or \ - ((outPt2.prevOp.pt.y <= pt.y) and (pt.y < outPt2.pt.y))) and \ - (pt.x < (outPt2.prevOp.pt.x - outPt2.pt.x) * (pt.y - outPt2.pt.y) / \ - (outPt2.prevOp.pt.y - outPt2.pt.y) + outPt2.pt.x)): result = not result - outPt2 = outPt2.nextOp - if outPt2 == outPt: break - -def _Poly2ContainsPoly1(outPt1, outPt2): - pt = outPt1 - if (_PointOnPolygon(pt.pt, outPt2)): - pt = pt.nextOp - while (pt != outPt1 and _PointOnPolygon(pt.pt, outPt2)): - pt = pt.nextOp - if (pt == outPt1): return True - return _PointInPolygon(pt.pt, outPt2) - -def _EdgesAdjacent(inode): - return (inode.e1.nextInSEL == inode.e2) or \ - (inode.e1.prevInSEL == inode.e2) - -def _UpdateOutPtIdxs(outrec): - op = outrec.pts - while True: - op.idx = outrec.idx - op = op.prevOp - if (op == outrec.pts): break - -class Clipper(ClipperBase): - - def __init__(self): - ClipperBase.__init__(self) - - self.ReverseOutput = False - self.ForceSimple = False - - self._PolyOutList = [] - self._ClipType = ClipType.Intersection - self._Scanbeam = None - self._ActiveEdges = None - self._SortedEdges = None - self._IntersectNodes = None - self._ClipFillType = PolyFillType.EvenOdd - self._SubjFillType = PolyFillType.EvenOdd - self._ExecuteLocked = False - self._UsingPolyTree = False - self._JoinList = None - self._HorzJoins = None - - def _Reset(self): - ClipperBase._Reset(self) - self._Scanbeam = None - self._PolyOutList = [] - lm = self._LocalMinList - while lm is not None: - self._InsertScanbeam(lm.y) - lm = lm.nextLm - - def Clear(self): - self._PolyOutList = [] - ClipperBase.Clear(self) - - def _InsertScanbeam(self, y): - if self._Scanbeam is None: - self._Scanbeam = Scanbeam(y) - elif y > self._Scanbeam.y: - self._Scanbeam = Scanbeam(y, self._Scanbeam) - else: - sb = self._Scanbeam - while sb.nextSb is not None and y <= sb.nextSb.y: - sb = sb.nextSb - if y == sb.y: return - newSb = Scanbeam(y, sb.nextSb) - sb.nextSb = newSb - - def _PopScanbeam(self): - result = self._Scanbeam.y - self._Scanbeam = self._Scanbeam.nextSb - return result - - def _SetWindingCount(self, edge): - e = edge.prevInAEL - while e is not None and e.PolyType != edge.PolyType: - e = e.prevInAEL - if e is None: - edge.windCnt = edge.windDelta - edge.windCnt2 = 0 - e = self._ActiveEdges - elif self._IsEvenOddFillType(edge): - edge.windCnt = 1 - edge.windCnt2 = e.windCnt2 - e = e.nextInAEL - else: - if e.windCnt * e.windDelta < 0: - if (abs(e.windCnt) > 1): - if (e.windDelta * edge.windDelta < 0): edge.windCnt = e.windCnt - else: edge.windCnt = e.windCnt + edge.windDelta - else: - edge.windCnt = e.windCnt + e.windDelta + edge.windDelta - elif (abs(e.windCnt) > 1) and (e.windDelta * edge.windDelta < 0): - edge.windCnt = e.windCnt - elif e.windCnt + edge.windDelta == 0: - edge.windCnt = e.windCnt - else: - edge.windCnt = e.windCnt + edge.windDelta - edge.windCnt2 = e.windCnt2 - e = e.nextInAEL - # update windCnt2 ... - if self._IsEvenOddAltFillType(edge): - while (e != edge): - if edge.windCnt2 == 0: edge.windCnt2 = 1 - else: edge.windCnt2 = 0 - e = e.nextInAEL - else: - while (e != edge): - edge.windCnt2 += e.windDelta - e = e.nextInAEL - - def _IsEvenOddFillType(self, edge): - if edge.PolyType == PolyType.Subject: - return self._SubjFillType == PolyFillType.EvenOdd - else: - return self._ClipFillType == PolyFillType.EvenOdd - - def _IsEvenOddAltFillType(self, edge): - if edge.PolyType == PolyType.Subject: - return self._ClipFillType == PolyFillType.EvenOdd - else: - return self._SubjFillType == PolyFillType.EvenOdd - - def _IsContributing(self, edge): - if edge.PolyType == PolyType.Subject: - pft = self._SubjFillType - pft2 = self._ClipFillType - else: - pft = self._ClipFillType - pft2 = self._SubjFillType - if pft == PolyFillType.EvenOdd or pft == PolyFillType.NonZero: - if abs(edge.windCnt) != 1: return False - elif pft == PolyFillType.Positive: - if edge.windCnt != 1: return False - elif pft == PolyFillType.Negative: - if edge.windCnt != -1: return False - - if self._ClipType == ClipType.Intersection: ########### - if pft2 == PolyFillType.EvenOdd or pft2 == PolyFillType.NonZero: - return edge.windCnt2 != 0 - elif pft2 == PolyFillType.Positive: - return edge.windCnt2 > 0 - else: - return edge.windCnt2 < 0 # Negative - elif self._ClipType == ClipType.Union: ########### - if pft2 == PolyFillType.EvenOdd or pft2 == PolyFillType.NonZero: - return edge.windCnt2 == 0 - elif pft2 == PolyFillType.Positive: - return edge.windCnt2 <= 0 - else: return edge.windCnt2 >= 0 # Negative - elif self._ClipType == ClipType.Difference: ########### - if edge.PolyType == PolyType.Subject: - if pft2 == PolyFillType.EvenOdd or pft2 == PolyFillType.NonZero: - return edge.windCnt2 == 0 - elif edge.PolyType == PolyFillType.Positive: - return edge.windCnt2 <= 0 - else: - return edge.windCnt2 >= 0 - else: - if pft2 == PolyFillType.EvenOdd or pft2 == PolyFillType.NonZero: - return edge.windCnt2 != 0 - elif pft2 == PolyFillType.Positive: - return edge.windCnt2 > 0 - else: - return edge.windCnt2 < 0 - else: # self._ClipType == ClipType.XOR: ########### - return True - - def _AddEdgeToSEL(self, edge): - if self._SortedEdges is None: - self._SortedEdges = edge - edge.prevInSEL = None - edge.nextInSEL = None - else: - # add edge to front of list ... - edge.nextInSEL = self._SortedEdges - edge.prevInSEL = None - self._SortedEdges.prevInSEL = edge - self._SortedEdges = edge - - def _CopyAELToSEL(self): - e = self._ActiveEdges - self._SortedEdges = e - while e is not None: - e.prevInSEL = e.prevInAEL - e.nextInSEL = e.nextInAEL - e = e.nextInAEL - - def _InsertEdgeIntoAEL(self, edge): - edge.prevInAEL = None - edge.nextInAEL = None - if self._ActiveEdges is None: - self._ActiveEdges = edge - elif _E2InsertsBeforeE1(self._ActiveEdges, edge): - edge.nextInAEL = self._ActiveEdges - self._ActiveEdges.prevInAEL = edge - self._ActiveEdges = edge - else: - e = self._ActiveEdges - while e.nextInAEL is not None and \ - not _E2InsertsBeforeE1(e.nextInAEL, edge): - e = e.nextInAEL - edge.nextInAEL = e.nextInAEL - if e.nextInAEL is not None: e.nextInAEL.prevInAEL = edge - edge.prevInAEL = e - e.nextInAEL = edge - - def _InsertLocalMinimaIntoAEL(self, botY): - while self._CurrentLocMin is not None and \ - self._CurrentLocMin.y == botY: - lb = self._CurrentLocMin.leftBound - rb = self._CurrentLocMin.rightBound - self._InsertEdgeIntoAEL(lb) - self._InsertScanbeam(lb.yTop) - self._InsertEdgeIntoAEL(rb) - if self._IsEvenOddFillType(lb): - lb.windDelta = 1 - rb.windDelta = 1 - else: - rb.windDelta = -lb.windDelta - self._SetWindingCount(lb) - rb.windCnt = lb.windCnt - rb.windCnt2 = lb.windCnt2 - if rb.dx == horizontal: - self._AddEdgeToSEL(rb) - self._InsertScanbeam(rb.nextInLML.yTop) - else: - self._InsertScanbeam(rb.yTop) - if self._IsContributing(lb): - self._AddLocalMinPoly(lb, rb, Point(lb.xCurr, self._CurrentLocMin.y)) - - if rb.outIdx >= 0 and rb.dx == horizontal and self._HorzJoins is not None: - hj = self._HorzJoins - while True: - dummy1, dummy2, overlap = _GetOverlapSegment(Point(hj.edge.xBot, hj.edge.yBot), - Point(hj.edge.xTop, hj.edge.yTop), - Point(rb.xBot, rb.yBot), - Point(rb.xTop, rb.yTop)) - if overlap: - self._AddJoin(hj.edge, rb, hj.savedIdx) - hj = hj.nextHj - if hj == self._HorzJoins: break - - if (lb.nextInAEL != rb): - - if rb.outIdx >= 0 and rb.prevInAEL.outIdx >= 0 and _SlopesEqual2(rb.prevInAEL, rb): - self._AddJoin(rb, rb.prevInAEL) - - e = lb.nextInAEL - pt = Point(lb.xCurr, lb.yCurr) - while e != rb: - self._IntersectEdges(rb, e, pt) - e = e.nextInAEL - self._PopLocalMinima() - - def _SwapPositionsInAEL(self, e1, e2): - if e1.nextInAEL == e2: - nextE = e2.nextInAEL - if nextE is not None: nextE.prevInAEL = e1 - prevE = e1.prevInAEL - if prevE is not None: prevE.nextInAEL = e2 - e2.prevInAEL = prevE - e2.nextInAEL = e1 - e1.prevInAEL = e2 - e1.nextInAEL = nextE - elif e2.nextInAEL == e1: - nextE = e1.nextInAEL - if nextE is not None: nextE.prevInAEL = e2 - prevE = e2.prevInAEL - if prevE is not None: prevE.nextInAEL = e1 - e1.prevInAEL = prevE - e1.nextInAEL = e2 - e2.prevInAEL = e1 - e2.nextInAEL = nextE - else: - nextE = e1.nextInAEL - prevE = e1.prevInAEL - e1.nextInAEL = e2.nextInAEL - if e1.nextInAEL is not None: e1.nextInAEL.prevInAEL = e1 - e1.prevInAEL = e2.prevInAEL - if e1.prevInAEL is not None: e1.prevInAEL.nextInAEL = e1 - e2.nextInAEL = nextE - if e2.nextInAEL is not None: e2.nextInAEL.prevInAEL = e2 - e2.prevInAEL = prevE - if e2.prevInAEL is not None: e2.prevInAEL.nextInAEL = e2 - if e1.prevInAEL is None: self._ActiveEdges = e1 - elif e2.prevInAEL is None: self._ActiveEdges = e2 - - def _SwapPositionsInSEL(self, e1, e2): - if e1.nextInSEL == e2: - nextE = e2.nextInSEL - if nextE is not None: nextE.prevInSEL = e1 - prevE = e1.prevInSEL - if prevE is not None: prevE.nextInSEL = e2 - e2.prevInSEL = prevE - e2.nextInSEL = e1 - e1.prevInSEL = e2 - e1.nextInSEL = nextE - elif e2.nextInSEL == e1: - nextE = e1.nextInSEL - if nextE is not None: nextE.prevInSEL = e2 - prevE = e2.prevInSEL - if prevE is not None: prevE.nextInSEL = e1 - e1.prevInSEL = prevE - e1.nextInSEL = e2 - e2.prevInSEL = e1 - e2.nextInSEL = nextE - else: - nextE = e1.nextInSEL - prevE = e1.prevInSEL - e1.nextInSEL = e2.nextInSEL - e1.nextInSEL = e2.nextInSEL - if e1.nextInSEL is not None: e1.nextInSEL.prevInSEL = e1 - e1.prevInSEL = e2.prevInSEL - if e1.prevInSEL is not None: e1.prevInSEL.nextInSEL = e1 - e2.nextInSEL = nextE - if e2.nextInSEL is not None: e2.nextInSEL.prevInSEL = e2 - e2.prevInSEL = prevE - if e2.prevInSEL is not None: e2.prevInSEL.nextInSEL = e2 - if e1.prevInSEL is None: self._SortedEdges = e1 - elif e2.prevInSEL is None: self._SortedEdges = e2 - - def _IsTopHorz(self, xPos): - e = self._SortedEdges - while e is not None: - if (xPos >= min(e.xCurr,e.xTop)) and (xPos <= max(e.xCurr,e.xTop)): - return False - e = e.nextInSEL - return True - - def _ProcessHorizontal(self, horzEdge): - if horzEdge.xCurr < horzEdge.xTop: - horzLeft = horzEdge.xCurr - horzRight = horzEdge.xTop - direction = Direction.LeftToRight - else: - horzLeft = horzEdge.xTop - horzRight = horzEdge.xCurr - direction = Direction.RightToLeft - eMaxPair = None - if horzEdge.nextInLML is None: - eMaxPair = _GetMaximaPair(horzEdge) - e = _GetnextInAEL(horzEdge, direction) - while e is not None: - if (e.xCurr == horzEdge.xTop) and eMaxPair is None: - if _SlopesEqual2(e, horzEdge.nextInLML): - if horzEdge.outIdx >= 0 and e.outIdx >= 0: - self._AddJoin(horzEdge.nextInLML, e, horzEdge.outIdx) - break - elif e.dx < horzEdge.nextInLML.dx: break - eNext = _GetnextInAEL(e, direction) - if eMaxPair is not None or \ - ((direction == Direction.LeftToRight) and (e.xCurr < horzRight)) or \ - ((direction == Direction.RightToLeft) and (e.xCurr > horzLeft)): - if e == eMaxPair: - if direction == Direction.LeftToRight: - self._IntersectEdges(horzEdge, e, Point(e.xCurr, horzEdge.yCurr)) - else: - self._IntersectEdges(e, horzEdge, Point(e.xCurr, horzEdge.yCurr)) - return - elif e.dx == horizontal and not _IsMinima(e) and e.xCurr <= e.xTop: - if direction == Direction.LeftToRight: - self._IntersectEdges(horzEdge, e, Point(e.xCurr, horzEdge.yCurr), - _ProtectRight(not self._IsTopHorz(e.xCurr))) - else: - self._IntersectEdges(e, horzEdge, Point(e.xCurr, horzEdge.yCurr), - _ProtectLeft(not self._IsTopHorz(e.xCurr))) - elif (direction == Direction.LeftToRight): - self._IntersectEdges(horzEdge, e, Point(e.xCurr, horzEdge.yCurr), - _ProtectRight(not self._IsTopHorz(e.xCurr))) - else: - self._IntersectEdges(e, horzEdge, Point(e.xCurr, horzEdge.yCurr), - _ProtectLeft(not self._IsTopHorz(e.xCurr))) - self._SwapPositionsInAEL(horzEdge, e) - elif ((direction == Direction.LeftToRight and e.xCurr >= horzRight) or \ - (direction == Direction.RightToLeft and e.xCurr <= horzLeft)): break - e = eNext - if horzEdge.nextInLML is not None: - if horzEdge.outIdx >= 0: - self._AddOutPt(horzEdge, Point(horzEdge.xTop, horzEdge.yTop)) - self._UpdateEdgeIntoAEL(horzEdge) - else: - if horzEdge.outIdx >= 0: - self._IntersectEdges(horzEdge, eMaxPair, \ - Point(horzEdge.xTop, horzEdge.yCurr), Protects.Both) - if eMaxPair.outIdx >= 0: raise Exception("Clipper: Horizontal Error") - self._DeleteFromAEL(eMaxPair) - self._DeleteFromAEL(horzEdge) - - def _ProcessHorizontals(self): - while self._SortedEdges is not None: - e = self._SortedEdges - self._DeleteFromSEL(e) - self._ProcessHorizontal(e) - - def _AddJoin(self, e1, e2, e1OutIdx = -1, e2OutIdx = -1): - jr = JoinRec() - if e1OutIdx >= 0: jr.poly1Idx = e1OutIdx - else: jr.poly1Idx = e1.outIdx - jr.pt1a = Point(e1.xCurr, e1.yCurr) - jr.pt1b = Point(e1.xTop, e1.yTop) - if e2OutIdx >= 0: jr.poly2Idx = e2OutIdx - else: jr.poly2Idx = e2.outIdx - jr.pt2a = Point(e2.xCurr, e2.yCurr) - jr.pt2b = Point(e2.xTop, e2.yTop) - if self._JoinList is None: - self._JoinList = [] - self._JoinList.append(jr) - - def _FixupJoinRecs(self, jr, outPt, startIdx): - for i in range(startIdx, len(self._JoinList)): - jr2 = self._JoinList[i] - if jr2.poly1Idx == jr.poly1Idx and _PointIsVertex(jr2.pt1a, outPt): - jr2.poly1Idx = jr.poly2Idx - if jr2.poly2Idx == jr.poly1Idx and _PointIsVertex(jr2.pt2a, outPt): - jr2.poly2Idx = jr.poly2Idx - - def _AddHorzJoin(self, e, idx): - hj = HorzJoin(e, idx) - if self._HorzJoins == None: - self._HorzJoins = hj - hj.nextHj = hj - hj.prevHj = hj - else: - hj.nextHj = self._HorzJoins - hj.prevHj = self._HorzJoins.prevHj - self._HorzJoins.prevHj.nextHj = hj - self._HorzJoins.prevHj = hj - - def _InsertIntersectNode(self, e1, e2, pt): - newNode = IntersectNode(e1, e2, pt) - if self._IntersectNodes is None: - self._IntersectNodes = newNode - elif newNode.pt.y > self._IntersectNodes.pt.y: - newNode.nextIn = self._IntersectNodes - self._IntersectNodes = newNode - else: - node = self._IntersectNodes - while node.nextIn is not None and \ - newNode.pt.y < node.nextIn.pt.y: - node = node.nextIn - newNode.nextIn = node.nextIn - node.nextIn = newNode - - def _ProcessIntersections(self, botY, topY): - try: - self._BuildIntersectList(botY, topY) - if self._IntersectNodes is None: return True - if self._IntersectNodes.nextIn is not None and \ - not self._FixupIntersectionOrder(): return False - self._ProcessIntersectList() - return True - finally: - self._IntersectNodes = None - self._SortedEdges = None - - def _BuildIntersectList(self, botY, topY): - e = self._ActiveEdges - if e is None: return - self._SortedEdges = e - while e is not None: - e.prevInSEL = e.prevInAEL - e.nextInSEL = e.nextInAEL - e.xCurr = _TopX(e, topY) - e = e.nextInAEL - while True: - isModified = False - e = self._SortedEdges - while e.nextInSEL is not None: - eNext = e.nextInSEL - if e.xCurr <= eNext.xCurr: - e = eNext - continue - pt, intersected = _IntersectPoint(e, eNext) - if not intersected and e.xCurr > eNext.xCurr +1: - raise Exception("Intersect Error") - if pt.y > botY: - pt = Point(_TopX(e, botY), botY) - self._InsertIntersectNode(e, eNext, pt) - self._SwapPositionsInSEL(e, eNext) - isModified = True - if e.prevInSEL is not None: - e.prevInSEL.nextInSEL = None - else: - break - if not isModified: break - self._SortedEdges = None - return - - def _ProcessIntersectList(self): - while self._IntersectNodes is not None: - node = self._IntersectNodes - self._IntersectEdges(node.e1, node.e2, node.pt, Protects.Both) - self._SwapPositionsInAEL(node.e1, node.e2) - self._IntersectNodes = node.nextIn - - def _DeleteFromAEL(self, e): - aelPrev = e.prevInAEL - aelNext = e.nextInAEL - if aelPrev is None and aelNext is None and e != self._ActiveEdges: - return - if aelPrev is not None: - aelPrev.nextInAEL = aelNext - else: - self._ActiveEdges = aelNext - if aelNext is not None: - aelNext.prevInAEL = aelPrev - e.nextInAEL = None - e.prevInAEL = None - - def _DeleteFromSEL(self, e): - SELPrev = e.prevInSEL - SELNext = e.nextInSEL - if SELPrev is None and SELNext is None and e != self._SortedEdges: - return - if SELPrev is not None: - SELPrev.nextInSEL = SELNext - else: - self._SortedEdges = SELNext - if SELNext is not None: - SELNext.prevInSEL = SELPrev - e.nextInSEL = None - e.prevInSEL = None - - def _IntersectEdges(self, e1, e2, pt, protects = Protects.Neither): - e1stops = protects & Protects.Left == 0 and \ - e1.nextInLML is None and \ - e1.xTop == pt.x and e1.yTop == pt.y - e2stops = protects & Protects.Right == 0 and \ - e2.nextInLML is None and \ - e2.xTop == pt.x and e2.yTop == pt.y - e1Contributing = e1.outIdx >= 0 - e2contributing = e2.outIdx >= 0 - - if e1.PolyType == e2.PolyType: - if self._IsEvenOddFillType(e1): - e1Wc = e1.windCnt - e1.windCnt = e2.windCnt - e2.windCnt = e1Wc - else: - if e1.windCnt + e2.windDelta == 0: e1.windCnt = -e1.windCnt - else: e1.windCnt += e2.windDelta - if e2.windCnt - e1.windDelta == 0: e2.windCnt = -e2.windCnt - else: e2.windCnt -= e1.windDelta - else: - if not self._IsEvenOddFillType(e2): e1.windCnt2 += e2.windDelta - elif e1.windCnt2 == 0: e1.windCnt2 = 1 - else: e1.windCnt2 = 0 - if not self._IsEvenOddFillType(e1): e2.windCnt2 -= e1.windDelta - elif e2.windCnt2 == 0: e2.windCnt2 = 1 - else: e2.windCnt2 = 0 - - if e1.PolyType == PolyType.Subject: - e1FillType = self._SubjFillType - e1FillType2 = self._ClipFillType - else: - e1FillType = self._ClipFillType - e1FillType2 = self._SubjFillType - - if e2.PolyType == PolyType.Subject: - e2FillType = self._SubjFillType - e2FillType2 = self._ClipFillType - else: - e2FillType = self._ClipFillType - e2FillType2 = self._SubjFillType - - if e1FillType == PolyFillType.Positive: e1Wc = e1.windCnt - elif e1FillType == PolyFillType.Negative: e1Wc = -e1.windCnt - else: e1Wc = abs(e1.windCnt) - - if e2FillType == PolyFillType.Positive: e2Wc = e2.windCnt - elif e2FillType == PolyFillType.Negative: e2Wc = -e2.windCnt - else: e2Wc = abs(e2.windCnt) - - if e1Contributing and e2contributing: - if e1stops or e2stops or \ - (e1Wc != 0 and e1Wc != 1) or (e2Wc != 0 and e2Wc != 1) or \ - (e1.PolyType != e2.PolyType and self._ClipType != ClipType.Xor): - self._AddLocalMaxPoly(e1, e2, pt) - else: - self._AddOutPt(e1, pt) - self._AddOutPt(e2, pt) - _SwapSides(e1, e2) - _SwapPolyIndexes(e1, e2) - elif e1Contributing: - if (e2Wc == 0 or e2Wc == 1): - self._AddOutPt(e1, pt) - _SwapSides(e1, e2) - _SwapPolyIndexes(e1, e2) - elif e2contributing: - if (e1Wc == 0 or e1Wc == 1): - self._AddOutPt(e2, pt) - _SwapSides(e1, e2) - _SwapPolyIndexes(e1, e2) - - elif (e1Wc == 0 or e1Wc == 1) and (e2Wc == 0 or e2Wc == 1) and \ - not e1stops and not e2stops: - - e1FillType2 = e2FillType2 = PolyFillType.EvenOdd - if e1FillType2 == PolyFillType.Positive: e1Wc2 = e1.windCnt2 - elif e1FillType2 == PolyFillType.Negative: e1Wc2 = -e1.windCnt2 - else: e1Wc2 = abs(e1.windCnt2) - if e2FillType2 == PolyFillType.Positive: e2Wc2 = e2.windCnt2 - elif e2FillType2 == PolyFillType.Negative: e2Wc2 = -e2.windCnt2 - else: e2Wc2 = abs(e2.windCnt2) - - if e1.PolyType != e2.PolyType: - self._AddLocalMinPoly(e1, e2, pt) - elif e1Wc == 1 and e2Wc == 1: - if self._ClipType == ClipType.Intersection: - if e1Wc2 > 0 and e2Wc2 > 0: - self._AddLocalMinPoly(e1, e2, pt) - elif self._ClipType == ClipType.Union: - if e1Wc2 <= 0 and e2Wc2 <= 0: - self._AddLocalMinPoly(e1, e2, pt) - elif self._ClipType == ClipType.Difference: - if (e1.PolyType == PolyType.Clip and e1Wc2 > 0 and e2Wc2 > 0) or \ - (e1.PolyType == PolyType.Subject and e1Wc2 <= 0 and e2Wc2 <= 0): - self._AddLocalMinPoly(e1, e2, pt) - else: - self._AddLocalMinPoly(e1, e2, pt) - else: - _SwapSides(e1, e2, self._PolyOutList) - - if e1stops != e2stops and \ - ((e1stops and e1.outIdx >= 0) or (e2stops and e2.outIdx >= 0)): - _SwapSides(e1, e2, self._PolyOutList) - _SwapPolyIndexes(e1, e2) - if e1stops: self._DeleteFromAEL(e1) - if e2stops: self._DeleteFromAEL(e2) - - def _DoMaxima(self, e, topY): - eMaxPair = _GetMaximaPair(e) - x = e.xTop - eNext = e.nextInAEL - while eNext != eMaxPair: - if eNext is None: raise Exception("DoMaxima error") - self._IntersectEdges(e, eNext, Point(x, topY), Protects.Both) - self._SwapPositionsInAEL(e, eNext) - eNext = e.nextInAEL - if e.outIdx < 0 and eMaxPair.outIdx < 0: - self._DeleteFromAEL(e) - self._DeleteFromAEL(eMaxPair) - elif e.outIdx >= 0 and eMaxPair.outIdx >= 0: - self._IntersectEdges(e, eMaxPair, Point(x, topY)) - else: - raise Exception("DoMaxima error") - - def _UpdateEdgeIntoAEL(self, e): - if e.nextInLML is None: - raise Exception("UpdateEdgeIntoAEL error") - aelPrev = e.prevInAEL - aelNext = e.nextInAEL - e.nextInLML.outIdx = e.outIdx - if aelPrev is not None: - aelPrev.nextInAEL = e.nextInLML - else: - self._ActiveEdges = e.nextInLML - if aelNext is not None: - aelNext.prevInAEL = e.nextInLML - e.nextInLML.side = e.side - e.nextInLML.windDelta = e.windDelta - e.nextInLML.windCnt = e.windCnt - e.nextInLML.windCnt2 = e.windCnt2 - e = e.nextInLML - e.prevInAEL = aelPrev - e.nextInAEL = aelNext - if e.dx != horizontal: - self._InsertScanbeam(e.yTop) - return e - - def _AddLocalMinPoly(self, e1, e2, pt): - if e2.dx == horizontal or e1.dx > e2.dx: - self._AddOutPt(e1, pt) - e2.outIdx = e1.outIdx - e1.side = EdgeSide.Left - e2.side = EdgeSide.Right - e = e1 - if e.prevInAEL == e2: prevE = e2.prevInAEL - else: prevE = e1.prevInAEL - else: - self._AddOutPt(e2, pt) - e1.outIdx = e2.outIdx - e1.side = EdgeSide.Right - e2.side = EdgeSide.Left - e = e2 - if e.prevInAEL == e1: prevE = e1.prevInAEL - else: prevE = e.prevInAEL - - if prevE is not None and prevE.outIdx >= 0 and \ - _TopX(prevE, pt.y) == _TopX(e, pt.y) and \ - _SlopesEqual2(e, prevE): - self._AddJoin(e, prevE) - return - - def _AddLocalMaxPoly(self, e1, e2, pt): - self._AddOutPt(e1, pt) - if e1.outIdx == e2.outIdx: - e1.outIdx = -1 - e2.outIdx = -1 - elif e1.outIdx < e2.outIdx: - self._AppendPolygon(e1, e2) - else: - self._AppendPolygon(e2, e1) - - def _CreateOutRec(self): - outRec = OutRec(len(self._PolyOutList)) - self._PolyOutList.append(outRec) - return outRec - - def _AddOutPt(self, e, pt): - toFront = e.side == EdgeSide.Left - if e.outIdx < 0: - outRec = self._CreateOutRec(); - e.outIdx = outRec.idx - op = OutPt(outRec.idx, pt) - op.nextOp = op - op.prevOp = op - outRec.pts = op - _SetHoleState(e, outRec, self._PolyOutList) - else: - outRec = self._PolyOutList[e.outIdx] - op = outRec.pts - if (toFront and _PointsEqual(pt, op.pt)) or \ - (not toFront and _PointsEqual(pt, op.prevOp.pt)): return - op2 = OutPt(outRec.idx, pt) - op2.nextOp = op - op2.prevOp = op.prevOp - op.prevOp.nextOp = op2 - op.prevOp = op2 - if toFront: outRec.pts = op2 - - def _AppendPolygon(self, e1, e2): - outRec1 = self._PolyOutList[e1.outIdx] - outRec2 = self._PolyOutList[e2.outIdx] - holeStateRec = None - if _Param1RightOfParam2(outRec1, outRec2): holeStateRec = outRec2 - elif _Param1RightOfParam2(outRec2, outRec1): holeStateRec = outRec1 - else: holeStateRec = _GetLowermostRec(outRec1, outRec2) - - p1_lft = outRec1.pts - p2_lft = outRec2.pts - p1_rt = p1_lft.prevOp - p2_rt = p2_lft.prevOp - newSide = EdgeSide.Left - - if e1.side == EdgeSide.Left: - if e2.side == EdgeSide.Left: - # z y x a b c - _ReversePolyPtLinks(p2_lft) - p2_lft.nextOp = p1_lft - p1_lft.prevOp = p2_lft - p1_rt.nextOp = p2_rt - p2_rt.prevOp = p1_rt - outRec1.pts = p2_rt - else: - # x y z a b c - p2_rt.nextOp = p1_lft - p1_lft.prevOp = p2_rt - p2_lft.prevOp = p1_rt - p1_rt.nextOp = p2_lft - outRec1.pts = p2_lft - else: - newSide = EdgeSide.Right - if e2.side == EdgeSide.Right: - # a b c z y x - _ReversePolyPtLinks(p2_lft) - p1_rt.nextOp = p2_rt - p2_rt.prevOp = p1_rt - p2_lft.nextOp = p1_lft - p1_lft.prevOp = p2_lft - else: - # a b c x y z - p1_rt.nextOp = p2_lft - p2_lft.prevOp = p1_rt - p1_lft.prevOp = p2_rt - p2_rt.nextOp = p1_lft - - outRec1.bottomPt = None - if holeStateRec == outRec2: - if outRec2.FirstLeft != outRec1: - outRec1.FirstLeft = outRec2.FirstLeft - outRec1.isHole = outRec2.isHole - outRec2.pts = None - outRec2.bottomPt = None - outRec2.FirstLeft = outRec1 - OKIdx = outRec1.idx - ObsoleteIdx = outRec2.idx - - e1.outIdx = -1 - e2.outIdx = -1 - - e = self._ActiveEdges - while e is not None: - if e.outIdx == ObsoleteIdx: - e.outIdx = OKIdx - e.side = newSide - break - e = e.nextInAEL - outRec2.idx = outRec1.idx - - def _FixupIntersectionOrder(self): - self._CopyAELToSEL() - inode = self._IntersectNodes - while inode is not None: - if (not _EdgesAdjacent(inode)): - nextNode = inode.nextIn - while (nextNode and not _EdgesAdjacent(nextNode)): - nextNode = nextNode.nextIn - if (nextNode is None): return False - e1 = inode.e1 - e2 = inode.e2 - p = inode.pt - inode.e1 = nextNode.e1 - inode.e2 = nextNode.e2 - inode.pt = nextNode.pt - nextNode.e1 = e1 - nextNode.e2 = e2 - nextNode.pt = p - - self._SwapPositionsInSEL(inode.e1, inode.e2); - inode = inode.nextIn - return True - - def _ProcessEdgesAtTopOfScanbeam(self, topY): - e = self._ActiveEdges - while e is not None: - if _IsMaxima(e, topY) and _GetMaximaPair(e).dx != horizontal: - ePrev = e.prevInAEL - self._DoMaxima(e, topY) - if ePrev is None: e = self._ActiveEdges - else: e = ePrev.nextInAEL - else: - intermediateVert = _IsIntermediate(e, topY) - if intermediateVert and e.nextInLML.dx == horizontal: - if e.outIdx >= 0: - self._AddOutPt(e, Point(e.xTop, e.yTop)) - hj = self._HorzJoins - if hj is not None: - while True: - _1, _2, overlap = _GetOverlapSegment( - Point(hj.edge.xBot, hj.edge.yBot), - Point(hj.edge.xTop, hj.edge.yTop), - Point(e.nextInLML.XBot, e.nextInLML.yBot), - Point(e.nextInLML.xTop, e.nextInLML.yTop)) - if overlap: self._AddJoin(hj.edge, e.nextInLML, hj.savedIdx, e.outIdx) - hj = hj.nextHj - if hj == self._HorzJoins: break - self._AddHorzJoin(e.nextInLML, e.outIdx) - - e = self._UpdateEdgeIntoAEL(e) - self._AddEdgeToSEL(e) - else: - e.xCurr = _TopX(e, topY) - e.yCurr = topY - if (self.ForceSimple and e.prevInAEL is not None and - e.prevInAEL.xCurr == e.xCurr and - e.outIdx >= 0 and e.prevInAEL.outIdx >= 0): - if (intermediateVert): - self._AddOutPt(e.prevInAEL, Point(e.xCurr, topY)); - else: - self._AddOutPt(e, Point(e.xCurr, topY)) - e = e.nextInAEL - - self._ProcessHorizontals() - - e = self._ActiveEdges - while e is not None: - if _IsIntermediate(e, topY): - if (e.outIdx >= 0) : - self._AddOutPt(e, Point(e.xTop, e.yTop)) - e = self._UpdateEdgeIntoAEL(e) - - ePrev = e.prevInAEL - eNext = e.nextInAEL - if ePrev is not None and ePrev.xCurr == e.xBot and \ - (ePrev.yCurr == e.yBot) and (e.outIdx >= 0) and \ - (ePrev.outIdx >= 0) and (ePrev.yCurr > ePrev.yTop) and \ - _SlopesEqual2(e, ePrev): - self._AddOutPt(ePrev, Point(e.xBot, e.yBot)) - self._AddJoin(e, ePrev) - elif eNext is not None and (eNext.xCurr == e.xBot) and \ - (eNext.yCurr == e.yBot) and (e.outIdx >= 0) and \ - (eNext.outIdx >= 0) and (eNext.yCurr > eNext.yTop) and \ - _SlopesEqual2(e, eNext): - self._AddOutPt(eNext, Point(e.xBot, e.yBot)) - self._AddJoin(e, eNext) - - e = e.nextInAEL - - def _Area(self, pts): - # see http://www.mathopenref.com/coordpolygonarea2.html - result = 0.0 - p = pts - while True: - result += (p.pt.x + p.prevOp.pt.x) * (p.prevOp.pt.y - p.pt.y) - p = p.nextOp - if p == pts: break - return result / 2 - - def _JoinPoints(self, jr): - p1, p2 = None, None - outRec1 = self._PolyOutList[jr.poly1Idx] - outRec2 = self._PolyOutList[jr.poly2Idx] - if outRec1 is None or outRec2 is None: return p1, p2, False - pp1a = outRec1.pts; pp2a = outRec2.pts - pt1 = jr.pt2a; pt2 = jr.pt2b - pt3 = jr.pt1a; pt4 = jr.pt1b - pp1a, pt1, pt2, result = _FindSegment(pp1a, pt1, pt2) - if not result: return p1, p2, False - if (outRec1 == outRec2): - pp2a = pp1a.nextOp - pp2a, pt3, pt4, result = _FindSegment(pp2a, pt3, pt4) - if not result or pp2a == pp1a: return p1, p2, False - else: - pp2a, pt3, pt4, result = _FindSegment(pp2a, pt3, pt4) - if not result: return p1, p2, False - pt1, pt2, result = _GetOverlapSegment(pt1, pt2, pt3, pt4) - if not result: return p1, p2, False - - prevOp = pp1a.prevOp - if _PointsEqual(pp1a.pt, pt1): p1 = pp1a - elif _PointsEqual(prevOp.pt, pt1): p1 = prevOp - else: p1 = _InsertPolyPtBetween(pp1a, prevOp, pt1) - - if _PointsEqual(pp1a.pt, pt2): p2 = pp1a - elif _PointsEqual(prevOp.pt, pt2): p2 = prevOp - elif (p1 == pp1a) or (p1 == prevOp): - p2 = _InsertPolyPtBetween(pp1a, prevOp, pt2) - elif _Pt3IsBetweenPt1AndPt2(pp1a.pt, p1.pt, pt2): - p2 = _InsertPolyPtBetween(pp1a, p1, pt2) - else: p2 = _InsertPolyPtBetween(p1, prevOp, pt2) - - prevOp = pp2a.prevOp - if _PointsEqual(pp2a.pt, pt1): p3 = pp2a - elif _PointsEqual(prevOp.pt, pt1): p3 = prevOp - else: p3 = _InsertPolyPtBetween(pp2a, prevOp, pt1) - if _PointsEqual(pp2a.pt, pt2): p4 = pp2a - elif _PointsEqual(prevOp.pt, pt2): p4 = prevOp - elif (p3 == pp2a) or (p3 == prevOp): - p4 = _InsertPolyPtBetween(pp2a, prevOp, pt2) - elif _Pt3IsBetweenPt1AndPt2(pp2a.pt, p3.pt, pt2): - p4 = _InsertPolyPtBetween(pp2a, p3, pt2) - else: p4 = _InsertPolyPtBetween(p3, prevOp, pt2) - - if p1.nextOp == p2 and p3.prevOp == p4: - p1.nextOp = p3 - p3.prevOp = p1 - p2.prevOp = p4 - p4.nextOp = p2 - return p1, p2, True - elif p1.prevOp == p2 and p3.nextOp == p4: - p1.prevOp = p3 - p3.nextOp = p1 - p2.nextOp = p4 - p4.prevOp = p2 - return p1, p2, True - return p1, p2, False - - def _FixupFirstLefts1(self, oldOutRec, newOutRec): - for outRec in self._PolyOutList: - if outRec.pts is not None and outRec.FirstLeft == oldOutRec: - if _Poly2ContainsPoly1(outRec.pts, newOutRec.pts): - outRec.FirstLeft = newOutRec - - def _FixupFirstLefts2(self, oldOutRec, newOutRec): - for outRec in self._PolyOutList: - if outRec.FirstLeft == oldOutRec: outRec.FirstLeft = newOutRec - - def _GetOutRec(self, idx): - outrec = self._PolyOutList[idx] - while (outrec != self._PolyOutList[outrec.idx]): - outrec = self._PolyOutList[outrec.idx] - return outrec - - def _JoinCommonEdges(self): - for i in range(len(self._JoinList)): - jr = self._JoinList[i] - outRec1 = self._GetOutRec(jr.poly1Idx) - outRec2 = self._GetOutRec(jr.poly2Idx) - if outRec1.pts is None or outRec2.pts is None: continue - - if outRec1 == outRec2: holeStateRec = outRec1 - elif _Param1RightOfParam2(outRec1, outRec2): holeStateRec = outRec2 - elif _Param1RightOfParam2(outRec2, outRec1): holeStateRec = outRec1 - else: holeStateRec = _GetLowermostRec(outRec1, outRec2) - - p1, p2, result = self._JoinPoints(jr) - if not result: continue - - if outRec1 == outRec2: - outRec1.pts = p1 - outRec1.bottomPt = None - outRec2 = self._CreateOutRec() - outRec2.pts = p2 - jr.poly2Idx = outRec2.idx - - if _Poly2ContainsPoly1(outRec2.pts, outRec1.pts): - outRec2.isHole = not outRec1.isHole - outRec2.FirstLeft = outRec1 - - self._FixupJoinRecs(jr, p2, i + 1) - - if self._UsingPolyTree: self._FixupFirstLefts2(outRec2, outRec1) - - _FixupOutPolygon(outRec1) - _FixupOutPolygon(outRec2) - - if outRec2.isHole == self._Area(outRec2) > 0.0: - _ReversePolyPtLinks(outRec2.pts) - - elif _Poly2ContainsPoly1(outRec1.pts, outRec2.pts): - outRec2.isHole = outRec1.isHole - outRec1.isHole = not outRec2.isHole - outRec2.FirstLeft = outRec1.FirstLeft - outRec1.FirstLeft = outRec2 - - self._FixupJoinRecs(jr, p2, i + 1) - - if self._UsingPolyTree: self._FixupFirstLefts2(outRec1, outRec2) - - _FixupOutPolygon(outRec1) - _FixupOutPolygon(outRec2) - - if outRec1.isHole == self._Area(outRec1) > 0.0: - _ReversePolyPtLinks(outRec1.pts) - else: - outRec2.isHole = outRec1.isHole - outRec2.FirstLeft = outRec1.FirstLeft - - self._FixupJoinRecs(jr, p2, i + 1) - if self._UsingPolyTree: self._FixupFirstLefts1(outRec1, outRec2) - - _FixupOutPolygon(outRec1) - _FixupOutPolygon(outRec2) - else: - _FixupOutPolygon(outRec1) - outRec2.pts = None - outRec2.bottomPt = None - outRec2.idx = outRec1.idx - - outRec1.isHole = holeStateRec.isHole - if holeStateRec == outRec2: - outRec1.FirstLeft = outRec2.FirstLeft - outRec2.FirstLeft = outRec1 - - if self._UsingPolyTree: self._FixupFirstLefts2(outRec2, outRec1) - return - - def _DoSimplePolygons(self): - i = 0; - while i < len(self._PolyOutList): - outrec = self._PolyOutList[i] - i +=1 - op = outrec.pts - if (op is None): continue - while True: - op2 = op.nextOp - while (op2 != outrec.pts): - if (_PointsEqual(op.pt, op2.pt) and op2.nextOp != op and op2.prevOp != op): - #split the polygon into two ... - op3 = op.prevOp - op4 = op2.prevOp - op.prevOp = op4 - op4.nextOp = op - op2.prevOp = op3 - op3.nextOp = op2 - - outrec.pts = op - outrec2 = self._CreateOutRec(); - outrec2.pts = op2; - _UpdateOutPtIdxs(outrec2) - if (_Poly2ContainsPoly1(outrec2.pts, outrec.pts)): - #OutRec2 is contained by OutRec1 ... - outrec2.isHole = not outrec.isHole - outrec2.FirstLeft = outrec - - elif (_Poly2ContainsPoly1(outrec.pts, outrec2.pts)): - #OutRec1 is contained by OutRec2 ... - outrec2.isHole = outrec.isHole - outrec.isHole = not outrec2.isHole - outrec2.FirstLeft = outrec.FirstLeft - outrec.FirstLeft = outrec2 - else: - #the 2 polygons are separate ... - outrec2.isHole = outrec.isHole; - outrec2.FirstLeft = outrec.FirstLeft; - op2 = op; # ie get ready for the next iteration - op2 = op2.nextOp - op = op.nextOp - if op == outrec.pts: break - return - - def _ExecuteInternal(self): - try: - try: - self._Reset() - if self._Scanbeam is None: return True - botY = self._PopScanbeam() - while True: - self._InsertLocalMinimaIntoAEL(botY) - self._HorzJoins = None - self._ProcessHorizontals() - topY = self._PopScanbeam() - if not self._ProcessIntersections(botY, topY): return False - self._ProcessEdgesAtTopOfScanbeam(topY) - botY = topY - if self._Scanbeam is None and self._CurrentLocMin is None: break - - for outRec in self._PolyOutList: - if outRec.pts is None: continue - _FixupOutPolygon(outRec) - if outRec.pts is None: continue - if outRec.isHole == (self._Area(outRec.pts) > 0.0): - _ReversePolyPtLinks(outRec.pts) - - if self._JoinList is not None: self._JoinCommonEdges() - if self.ForceSimple: self._DoSimplePolygons() - - return True - finally: - self._JoinList = None - self._HorzJoins = None - except: - return False - - def Execute( - self, - clipType, - solution, - subjFillType = PolyFillType.EvenOdd, - clipFillType = PolyFillType.EvenOdd): - if self._ExecuteLocked: return False - try: - self._ExecuteLocked = True - self._UsingPolyTree = True - del solution[:] - self._SubjFillType = subjFillType - self._ClipFillType = clipFillType - self._ClipType = clipType - result = self._ExecuteInternal() - if result: self._BuildResult(solution) - finally: - self._ExecuteLocked = False - self._UsingPolyTree = False - return result - - def Execute2( - self, - clipType, - solutionTree, - subjFillType = PolyFillType.EvenOdd, - clipFillType = PolyFillType.EvenOdd): - if self._ExecuteLocked: return False - try: - self._ExecuteLocked = True - self._UsingPolyTree = True - solutionTree.Clear() - self._SubjFillType = subjFillType - self._ClipFillType = clipFillType - self._ClipType = clipType - result = self._ExecuteInternal() - if result: self._BuildResult2(solutionTree) - finally: - self._ExecuteLocked = False - self._UsingPolyTree = False - return result - - def _BuildResult(self, polygons): - for outRec in self._PolyOutList: - if outRec is None: continue - cnt = _PointCount(outRec.pts) - if (cnt < 3): continue - poly = [] - op = outRec.pts - for _ in range(cnt): - poly.append(Point(op.pt.x, op.pt.y)) - op = op.prevOp - polygons.append(poly) - return - - def _BuildResult2(self, polyTree): - for outRec in self._PolyOutList: - if outRec is None: continue - cnt = _PointCount(outRec.pts) - if (cnt < 3): continue - _FixHoleLinkage(outRec) - - # add nodes to _AllNodes list ... - polyNode = PolyNode() - polyTree._AllNodes.append(polyNode) - outRec.PolyNode = polyNode - op = outRec.pts - while True: - polyNode.Contour.append(op.pt) - op = op.prevOp - if op == outRec.pts: break - # build the tree ... - for outRec in self._PolyOutList: - if outRec.PolyNode is None: continue - if outRec.FirstLeft is None: - polyTree._AddChild(outRec.PolyNode) - else: - outRec.FirstLeft.PolyNode._AddChild(outRec.PolyNode) - return - -#=============================================================================== -# OffsetPolygons (+ ancilliary functions) -#=============================================================================== - -FloatPoint = namedtuple('FloatPoint', 'x y') -Rect = namedtuple('FloatPoint', 'left top right bottom') - -def _GetUnitNormal(pt1, pt2): - if pt2.x == pt1.x and pt2.y == pt1.y: - return FloatPoint(0.0, 0.0) - dx = pt2.x - pt1.x - dy = pt2.y - pt1.y - f = 1.0 / math.hypot(dx, dy) - dx = float(dx) * f - dy = float(dy) * f - return FloatPoint(dy, -dx) - -def _BuildArc(pt, a1, a2, r, limit): - arcFrac = abs(a2 - a1) / (2 * math.pi); - steps = int(arcFrac * math.pi / math.acos(1 - limit / abs(r))) - if steps < 2: steps = 2 - elif steps > 222.0 * arcFrac: - steps = int(222.0 * arcFrac) - - result = [] - y = math.sin(a1) - x = math.cos(a1) - s = math.sin((a2-a1)/steps) - c = math.cos((a2-a1)/steps) - for _ in range(steps+1): - result.append(FloatPoint(pt.x + round(x * r), pt.y + round(y * r))) - x2 = x - x = x * c - s * y # cross product & dot product here ... - y = x2 * s + y * c # avoids repeat calls to the much slower sin() & cos() - - return result - -def _GetBounds(pts): - left = None - for poly in pts: - for pt in poly: - left = pt.x - top = pt.y - right = pt.x - bottom = pt.y - break - break - - for poly in pts: - for pt in poly: - if pt.x < left: left = pt.x - if pt.x > right: right = pt.x - if pt.y < top: top = pt.y - if pt.y > bottom: bottom = pt.y - if left is None: return Rect(0, 0, 0, 0) - else: return Rect(left, top, right, bottom) - -def _GetLowestPt(poly): - # precondition: poly must not be empty - result = poly[0] - for pt in poly: - if pt.y > result.y or (pt.y == result.y and pt.x < result.x): - result = pt - return result - -def _StripDupPts(poly): - if poly == []: return poly - for i in range(1, len(poly)): - if _PointsEqual(poly[i-1], poly[i]): poly.pop(i) - i = len(poly) -1 - while i > 0 and _PointsEqual(poly[i], poly[0]): - poly.pop(i) - i -= 1 - return poly - -def _OffsetInternal(polys, isPolygon, delta, jointype = JoinType.Square, endtype = EndType.Square, limit = 0.0): - - def _DoSquare(pt): - pt1 = Point(round(pt.x + Normals[k].x * delta), round(pt.y + Normals[k].y * delta)) - pt2 = Point(round(pt.x + Normals[j].x * delta), round(pt.y + Normals[j].y * delta)) - if (Normals[k].x*Normals[j].y-Normals[j].x*Normals[k].y) * delta >= 0: - a1 = math.atan2(Normals[k].y, Normals[k].x) - a2 = math.atan2(-Normals[j].y, -Normals[j].x) - a1 = abs(a2 - a1); - if a1 > math.pi: a1 = math.pi * 2 - a1 - dx = math.tan((math.pi - a1)/4) * abs(delta) - - pt1 = Point(round(pt1.x -Normals[k].y * dx), round(pt1.y + Normals[k].x * dx)) - result.append(pt1) - pt2 = Point(round(pt2.x + Normals[j].y * dx), round(pt2.y - Normals[j].x * dx)) - result.append(pt2) - else: - result.append(pt1) - result.append(pt) - result.append(pt2) - - def _DoMiter(pt, r): - if ((Normals[k].x* Normals[j].y - Normals[j].x * Normals[k].y) * delta >= 0): - q = delta / r; - result.append(Point(round(pt.x + (Normals[k].x + Normals[j].x) *q), - round(pt.y + (Normals[k].y + Normals[j].y) *q))) - else: - pt1 = Point(round(pt.x + Normals[k].x * delta), \ - round(pt.y + Normals[k].y * delta)) - pt2 = Point(round(pt.x + Normals[j].x * delta), \ - round(pt.y + Normals[j].y * delta)) - result.append(pt1) - result.append(pt) - result.append(pt2) - - def _DoRound(pt, limit): - pt1 = Point(round(pt.x + Normals[k].x * delta), \ - round(pt.y + Normals[k].y * delta)) - pt2 = Point(round(pt.x + Normals[j].x * delta), \ - round(pt.y + Normals[j].y * delta)) - result.append(pt1) - if (Normals[k].x * Normals[j].y - Normals[j].x * Normals[k].y) *delta >= 0: - if (Normals[j].x * Normals[k].x + Normals[j].y * Normals[k].y) < 0.985: - a1 = math.atan2(Normals[k].y, Normals[k].x) - a2 = math.atan2(Normals[j].y, Normals[j].x) - if (delta > 0) and (a2 < a1): a2 = a2 + math.pi * 2 - elif (delta < 0) and (a2 > a1): a2 = a2 - math.pi * 2 - arc = _BuildArc(pt, a1, a2, delta, limit) - result.extend(arc) - else: - result.append(pt) - result.append(pt2) - - def _OffsetPoint(jointype, limit): - if jointype == JoinType.Miter: - r = 1.0 + (Normals[j].x * Normals[k].x + Normals[j].y * Normals[k].y) - if (r >= rmin): _DoMiter(pts[j], r) - else: _DoSquare(pts[j]) - elif jointype == JoinType.Square: _DoSquare(pts[j]) - else: _DoRound(pts[j], limit) - return j - - if delta == 0: return polys - rmin = 0.5 - if (jointype == JoinType.Miter): - if (limit > 2): - rmin = 2.0 / (limit * limit) - limit = 0.25; #just in case endtype == EndType.Round - else: - if (limit <= 0): limit = 0.25 - elif (limit > abs(delta)): limit = abs(delta) - - res = [] - ppts = polys[:] - for pts in ppts: - Normals = [] - result = [] - cnt = len(pts) - - if (cnt == 0 or cnt < 3 and delta <= 0): continue - elif (cnt == 1): - res.append(_BuildArc(pts[0], 0, 2 * math.pi, delta, limit)) - continue - - forceClose = _PointsEqual(pts[0], pts[cnt - 1]) - if (forceClose): cnt -=1 - - for j in range(cnt -1): - Normals.append(_GetUnitNormal(pts[j], pts[j+1])) - if isPolygon or forceClose: - Normals.append(_GetUnitNormal(pts[cnt-1], pts[0])) - else: - Normals.append(Normals[cnt-2]) - - - if (isPolygon or forceClose): - k = cnt - 1 - for j in range(cnt): - k = _OffsetPoint(jointype, limit) - res.append(result) - - if not isPolygon: - result = [] - delta = -delta - k = cnt - 1 - for j in range(cnt): - k = _OffsetPoint(jointype, limit) - delta = -delta - res.append(result[::-1]) - - else: - # offset the polyline going forward ... - k = 0; - for j in range(1, cnt-1): - k = _OffsetPoint(jointype, limit) - - # handle the end (butt, round or square) ... - if (endtype == EndType.Butt): - j = cnt - 1 - pt1 = Point(round(float(pts[j].x) + Normals[j].x * delta), \ - round(float(pts[j].y) + Normals[j].y * delta)) - result.append(pt1) - pt1 = Point(round(float(pts[j].x) - Normals[j].x * delta), \ - round(float(pts[j].y) - Normals[j].y * delta)) - result.append(pt1) - else: - j = cnt - 1; - k = cnt - 2; - Normals[j] = DoublePoint(-Normals[j].x, -Normals[j].y) - if (endtype == EndType.Square): _DoSquare(pts[j]) - else: _DoRound(pts[j], limit) - - # re-build Normals ... - for j in range(cnt -1, 0, -1): - Normals[j] = DoublePoint(-Normals[j -1].x, -Normals[j -1].y) - Normals[0] = DoublePoint(-Normals[1].x, -Normals[1].y) - - # offset the polyline going backward ... - k = cnt -1; - for j in range(cnt -2, 0, -1): - k = _OffsetPoint(jointype, limit) - - # finally handle the start (butt, round or square) ... - if (endtype == EndType.Butt): - pt1 = Point(round(float(pts[0].x) - Normals[0].x * delta), \ - round(float(pts[0].y) - Normals[0].y * delta)) - result.append(pt1) - pt1 = Point(round(float(pts[0].x) + Normals[0].x * delta), \ - round(float(pts[0].y) + Normals[0].y * delta)) - result.append(pt1) - else: - j = 0 - k = 1 - if (endtype == EndType.Square): _DoSquare(pts[0]) - else: _DoRound(pts[0], limit) - res.append(result) - - - c = Clipper() - c.AddPolygons(res, PolyType.Subject) - if delta > 0: - c.Execute(ClipType.Union, res, PolyFillType.Positive, PolyFillType.Positive) - else: - bounds = _GetBounds(res) - outer = [] - outer.append(Point(bounds.left-10, bounds.bottom+10)) - outer.append(Point(bounds.right+10, bounds.bottom+10)) - outer.append(Point(bounds.right+10, bounds.top-10)) - outer.append(Point(bounds.left-10, bounds.top-10)) - c.AddPolygon(outer, PolyType.Subject) - c.Execute(ClipType.Union, res, PolyFillType.Negative, PolyFillType.Negative) - if len(res) > 0: res.pop(0) - for poly in res: - poly = poly[::-1] - return res - -def OffsetPolygons(polys, delta, jointype = JoinType.Square, limit = 0.0, autoFix = True): - if not autoFix: - return _OffsetInternal(polys, True, delta, jointype, EndType.Butt, limit) - pts = polys[:] - botPoly = None - botPt = None - for poly in pts: - poly = _StripDupPts(poly) - if len(poly) < 3: continue - bot = _GetLowestPt(poly) - if botPt is None or (bot.y > botPt.y) or \ - (bot.y == botPt.y and bot.x < botPt.x): - botPt = bot - botPoly = poly - if botPt is None: return [] - # if the outermost polygon has the wrong orientation, - # reverse the orientation of all the polygons ... - if Area(botPoly) < 0.0: - for i in range(len(pts)): - pts[i] = pts[i][::-1] - return _OffsetInternal(pts, True, delta, jointype, EndType.Butt, limit) - -def OffsetPolyLines(polys, delta, jointype = JoinType.Square, endtype = EndType.Square, limit = 0.0): - polys2 = polys[:] - for p in polys2: - if p == []: continue - for i in range(1, len(p)): - if _PointsEqual(p[i-1], p[i]): p.pop(i) - - if endtype == EndType.Closed: - for i in range(len(polys2)): - polys2.append(polys2[i][::-1]) - return _OffsetInternal(polys2, True, delta, jointype, EndType.Butt, limit) - else: - return _OffsetInternal(polys2, False, delta, jointype, endtype, limit) - -def _DistanceSqrd(pt1, pt2): - dx = (pt1.x - pt2.x) - dy = (pt1.y - pt2.y) - return (dx*dx + dy*dy) - -def _ClosestPointOnLine(pt, linePt1, linePt2): - dx = linePt2.x - linePt1.x - dy = linePt2.y - linePt1.y - if (dx == 0 and dy == 0): - return DoublePoint(linePt1.x, linePt1.y) - q = ((pt.x-linePt1.x)*dx + (pt.Y-linePt1.Y)*dy) / (dx*dx + dy*dy) - return DoublePoint( - (1-q)*linePt1.X + q*linePt2.X, - (1-q)*linePt1.Y + q*linePt2.Y) - -def _SlopesNearColinear(pt1, pt2, pt3, distSqrd): - if _DistanceSqrd(pt1, pt2) > _DistanceSqrd(pt1, pt3): return False - cpol = _ClosestPointOnLine(pt2, pt1, pt3); - dx = pt2.x - cpol.x - dy = pt2.y - cpol.y - return (dx*dx + dy*dy) < distSqrd - -def _PointsAreClose(pt1, pt2, distSqrd): - dx = pt1.x - pt2.x - dy = pt1.y - pt2.y - return (dx * dx) + (dy * dy) <= distSqrd - -def CleanPolygon(poly, distance = 1.415): - distSqrd = distance * distance - highI = len(poly) -1 - while (highI > 0 and _PointsEqual(poly[highI], poly[0])): highI -= 1 - if (highI < 2): return [] - pt = poly[highI] - result = [] - i = 0 - while True: - while (i < highI and _PointsAreClose(pt, poly[i+1], distSqrd)): i +=2 - i2 = i - while (i < highI and (_PointsAreClose(poly[i], poly[i+1], distSqrd) or \ - _SlopesNearColinear(pt, poly[i], poly[i+1], distSqrd))): i +=1 - if i >= highI: break - elif i != i2: continue - pt = poly[i] - i +=1 - result.append(pt) - - if (i <= highI): result.append(poly[i]) - j = len(result) - if (j > 2 and _SlopesNearColinear(result[j-2], result[j-1], result[0], distSqrd)): - del result[j-1:] - if len(result) < 3: return [] - else: return result - -def CleanPolygons(polys, distance = 1.415): - result = [] - for poly in polys: - result.append(CleanPolygon(poly, distance = 1.415)) - return result - -def SimplifyPolygon(poly, fillType): - result = [] - c = Clipper(); - c.ForceSimple = True - c.AddPolygon(poly, PolyType.Subject); - c.Execute(ClipType.Union, result, fillType, fillType) - return result - -def SimplifyPolygons(polys, fillType): - result = [] - c = Clipper(); - c.ForceSimple = True - c.AddPolygons(polys, PolyType.Subject); - c.Execute(ClipType.Union, result, fillType, fillType) - return result diff --git a/util/coadd-main.c b/util/coadd-main.c index e372ad130..e51f3b887 100644 --- a/util/coadd-main.c +++ b/util/coadd-main.c @@ -1,3 +1,7 @@ +/* +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE + */ #include #include #include diff --git a/util/coadd.c b/util/coadd.c index 0f7a1adcf..4d22c5179 100644 --- a/util/coadd.c +++ b/util/coadd.c @@ -1,3 +1,7 @@ +/* +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE + */ #include #include #include diff --git a/util/codekd.c b/util/codekd.c index 098ca7efb..21fd789bc 100644 --- a/util/codekd.c +++ b/util/codekd.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006-2008 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/util/compare-runs.py b/util/compare-runs.py deleted file mode 100644 index fdf3bf454..000000000 --- a/util/compare-runs.py +++ /dev/null @@ -1,171 +0,0 @@ -#! /usr/bin/env python - -import matplotlib -matplotlib.use('Agg') - -from astrometry.util.fits import * -from astrometry.util.file import * - -from pylab import * -from optparse import * -import os -from glob import glob -from numpy import * - -def get_field(fieldname, m1, m2, nil, preproc=None): - t1 = [] - t2 = [] - for k,v in m1.items(): - tt1 = v.getcolumn(fieldname) - if preproc is not None: - #print 'tt1=', tt1 - tt1 = preproc(tt1) - #print 'after: tt1=', tt1 - if not k in m2: - tt2 = nil - else: - tt2 = m2[k].getcolumn(fieldname) - if preproc is not None: - tt2 = preproc(tt2) - t1.append(tt1) - t2.append(tt2) - - for k,v in m2.items(): - if k in m1: - continue - tt2 = v.getcolumn(fieldname) - if preproc is not None: - tt2 = preproc(tt2) - t2.append(tt2) - t1.append(nil) - - return t1,t2 - - -def get_scalar(fieldname, m1, m2, nil): - t1,t2 = get_field(fieldname, m1, m2, None) - s1,s2 = [],[] - for tt1,tt2 in zip(t1,t2): - if tt1 is None and tt2 is None: - s1.append(nil) - s2.append(nil) - continue - if tt1 is None: - s1.append([nil for i in range(len(tt2))]) - else: - s1.append(tt1) - if tt2 is None: - s2.append([nil for i in range(len(tt1))]) - else: - s2.append(tt2) - t1 = hstack(s1) - t2 = hstack(s2) - return t1,t2 - - -if __name__ == '__main__': - parser = OptionParser() - opt,args = parser.parse_args() - - for id1,d1 in enumerate(args): - allm1 = os.path.join(d1, 'matches.pickle') - if os.path.exists(allm1): - continue - print 'Caching', allm1 - matches = {} - for fn in glob(d1 + '/*.match'): - matches[fn.replace(d1+'/', '')] = fits_table(fn) - pickle_to_file(matches, allm1) - - - for id1,d1 in enumerate(args): - allm1 = os.path.join(d1, 'matches.pickle') - m1 = unpickle_from_file(allm1) - for id2,d2 in enumerate(args): - if id2 <= id1: - continue - - allm2 = os.path.join(d2, 'matches.pickle') - m2 = unpickle_from_file(allm2) - - # CPU time. - tz,tinf = 1e-3, 100. - clf() - t1,t2 = get_scalar('timeused', m1, m2, tinf) - #plot(t1, t2, 'r.') - loglog(t1, t2, 'r.') - t1 = clip(t1, tz, tinf) - t2 = clip(t2, tz, tinf) - xlabel(d1 + ': CPU time (s)') - ylabel(d2 + ': CPU time (s)') - fn = 'cputime-%i-%i.png' % (id1, id2) - print 'saving', fn - plot([tz,tinf],[tz,tinf], 'k-') - axis([tz,tinf,tz,tinf]) - savefig(fn) - - # N objs - tinf = 1000. - clf() - def ppmax(x): - return amax(x, axis=1) - t1,t2 = get_field('fieldobjs', m1, m2, tinf, preproc=ppmax) - t1 = array(list(flatten(t1))) - t2 = array(list(flatten(t2))) - #print 'nobjs: t1=', t1 - #print 't2=', t2 - dN = 50 - I = logical_or((t1 - t2) > dN , (t1 - t2) < -dN) - for i in flatnonzero(I): - k1,v1 = (m1.items())[i] - k2,v2 = (m2.items())[i] - print 'Nmatch changed:' - print ' %s: %i' % (k1, t1[i]) - print ' %s: %i' % (k2, t2[i]) - - - plot(t1, t2, 'r.') - xlabel(d1 + ': N objects examined') - ylabel(d2 + ': N objects examined') - fn = 'nobjs-%i-%i.png' % (id1, id2) - print 'saving', fn - plot([0,100],[0,100], 'k-') - axis([0,100,0,100]) - savefig(fn) - - # N matches - tz,tinf = 0.,300. - clf() - t1,t2 = get_scalar('nmatch', m1, m2, tinf) - print 'm1,m2,t1,t2', len(m1),len(m2), len(t1),len(t2) - I = (t2 < 50) - for i in flatnonzero(I): - k,v = (m2.items())[i] - print 't2 file %s, nmatches %i' % (k, t2[i]) - t1 = clip(t1, tz, tinf) - t2 = clip(t2, tz, tinf) - plot(t1, t2, 'r.') - xlabel(d1 + ': N objects matched') - ylabel(d2 + ': N objects matched') - fn = 'nmatch-%i-%i.png' % (id1, id2) - print 'saving', fn - plot([tz,tinf],[tz,tinf], 'k-') - axis([tz,tinf,tz,tinf]) - savefig(fn) - - # Index # - tinf = 1000. - clf() - t1,t2 = get_scalar('indexid', m1, m2, tinf) - plot(t1, t2, 'r.') - xlabel(d1 + ': Index number') - ylabel(d2 + ': Index number') - print 't1: ', unique(t1) - print 't2: ', unique(t2) - axis([min(t1)-1, max(t1)+1, min(t2)-1, max(t2)+1]) - xticks(range(min(t1), max(t1))) - yticks(range(min(t2), max(t2))) - fn = 'indexid-%i-%i.png' % (id1, id2) - print 'saving', fn - savefig(fn) - diff --git a/util/convolve-image.c b/util/convolve-image.c index fd91ba994..5a65e6e6e 100644 --- a/util/convolve-image.c +++ b/util/convolve-image.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2011 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/util/dallpeaks.c b/util/dallpeaks.c index affc1842c..ee97a1866 100644 --- a/util/dallpeaks.c +++ b/util/dallpeaks.c @@ -1,20 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Michael Blanton, Keir Mierle, David W. Hogg, - Sam Roweis and Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/util/dallpeaks.inc b/util/dallpeaks.inc index 5c29089a8..cfb838fdc 100644 --- a/util/dallpeaks.inc +++ b/util/dallpeaks.inc @@ -1,21 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Michael Blanton, Keir Mierle, David W. Hogg, - Sam Roweis and Dustin Lang. - Copyright 2009 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ /* Finds all peaks in the image by cutting a bounding box out around diff --git a/util/datalog.c b/util/datalog.c index 1a2e49e21..745023435 100644 --- a/util/datalog.c +++ b/util/datalog.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2010 Dustin Lang - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/util/dcen3x3.c b/util/dcen3x3.c index c804c6b88..661438014 100644 --- a/util/dcen3x3.c +++ b/util/dcen3x3.c @@ -1,21 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Michael Blanton, Keir Mierle, David W. Hogg, - Sam Roweis and Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free - Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA - 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/util/defaults.py b/util/defaults.py deleted file mode 100644 index c8d477bc0..000000000 --- a/util/defaults.py +++ /dev/null @@ -1,20 +0,0 @@ -import matplotlib -#matplotlib.use('Agg') -#matplotlib.use('cairo') - -# Check out: http://matplotlib.sourceforge.net/users/customizing.html -from matplotlib import rc -#rc('font',**{'family':'sans-serif','sans-serif':['Helvetica']}) -rc('font', family='computer modern roman') -rc('text', usetex=True) -#rc('text.latex', preamble=r'\usepackage{color}') -rc('lines', antialiased=True) -rc('legend', fontsize='medium', numpoints=1) # default: large -rc('axes', titlesize='medium') -rc('image', interpolation='nearest', cmap='gray', origin='lower', - resample=False) - -def savefig(fn, **kwargs): - from pylab import savefig as sf - sf(fn, **kwargs) - print 'Wrote figure', fn diff --git a/util/degtohms.py b/util/degtohms.py index 3ad8d2210..00b941a41 100755 --- a/util/degtohms.py +++ b/util/degtohms.py @@ -1,4 +1,6 @@ #! /usr/bin/env python +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE import sys diff --git a/util/dfind.c b/util/dfind.c index 61ddcf8e9..038166edd 100644 --- a/util/dfind.c +++ b/util/dfind.c @@ -1,20 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Michael Blanton, Keir Mierle, David W. Hogg, Sam Roweis - and Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/util/dfind2.c b/util/dfind2.c index 31bc77d95..06de5ab71 100644 --- a/util/dfind2.c +++ b/util/dfind2.c @@ -1,20 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Michael Blanton, Keir Mierle, David W. Hogg, Sam Roweis - and Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ // This file gets #included in dfind.c, with diff --git a/util/dmedsmooth.c b/util/dmedsmooth.c index c32899f14..a8c161023 100644 --- a/util/dmedsmooth.c +++ b/util/dmedsmooth.c @@ -1,21 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Michael Blanton, Keir Mierle, David W. Hogg, - Sam Roweis and Dustin Lang. - Copyright 2013 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/util/dobjects.c b/util/dobjects.c index 125f175e4..75663d08f 100644 --- a/util/dobjects.c +++ b/util/dobjects.c @@ -1,20 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Michael Blanton, Keir Mierle, David W. Hogg, Sam Roweis - and Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/util/downsample-fits.c b/util/downsample-fits.c index 86ae3078f..1e45d66a6 100644 --- a/util/downsample-fits.c +++ b/util/downsample-fits.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2009 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include #include diff --git a/util/dpeaks.c b/util/dpeaks.c index 7dd3c1823..7bb322ea2 100644 --- a/util/dpeaks.c +++ b/util/dpeaks.c @@ -1,20 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006-2008 Michael Blanton, Keir Mierle, David W. Hogg, Sam Roweis - and Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/util/dr7fields.fits b/util/dr7fields.fits deleted file mode 120000 index 6ca7fb836..000000000 --- a/util/dr7fields.fits +++ /dev/null @@ -1 +0,0 @@ -../../../data/dr7fields.fits \ No newline at end of file diff --git a/util/dselip.c b/util/dselip.c index 970fd98aa..73ff4d530 100644 --- a/util/dselip.c +++ b/util/dselip.c @@ -1,20 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Michael Blanton, Keir Mierle, David W. Hogg, - Sam Roweis and Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/util/dsigma.c b/util/dsigma.c index a1fdb6595..31fe9366b 100644 --- a/util/dsigma.c +++ b/util/dsigma.c @@ -1,21 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Michael Blanton, Keir Mierle, David W. Hogg, Sam Roweis - and Dustin Lang. - Copyright 2009 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/util/dsigma.inc b/util/dsigma.inc index ceccbfbbb..f3628126a 100644 --- a/util/dsigma.inc +++ b/util/dsigma.inc @@ -1,21 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Michael Blanton, Keir Mierle, David W. Hogg, Sam Roweis - and Dustin Lang. - Copyright 2009 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #define GLUE2(a,b) a ## b diff --git a/util/dsmooth.c b/util/dsmooth.c index 8469032ce..f5a9956f8 100644 --- a/util/dsmooth.c +++ b/util/dsmooth.c @@ -1,20 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Michael Blanton, Keir Mierle, David W. Hogg, Sam Roweis - and Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/util/dsmooth.inc b/util/dsmooth.inc index 189818c39..d86e69cd8 100644 --- a/util/dsmooth.inc +++ b/util/dsmooth.inc @@ -1,20 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Michael Blanton, Keir Mierle, David W. Hogg, Sam Roweis - and Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ diff --git a/util/eigen-math-c.c b/util/eigen-math-c.c index 1a3976e59..74ec8bf2d 100644 --- a/util/eigen-math-c.c +++ b/util/eigen-math-c.c @@ -1,3 +1,7 @@ +/* +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE + */ #include #include diff --git a/util/eigen-math-cc.cc b/util/eigen-math-cc.cc index dfe913ba5..95343f61c 100644 --- a/util/eigen-math-cc.cc +++ b/util/eigen-math-cc.cc @@ -1,3 +1,7 @@ +/* +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE + */ //#include #include //using namespace std; diff --git a/util/errors.c b/util/errors.c index 9a941c170..d8d21994f 100644 --- a/util/errors.c +++ b/util/errors.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2008 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/util/file.py b/util/file.py index 77309b23f..e58b45a93 100644 --- a/util/file.py +++ b/util/file.py @@ -1,3 +1,6 @@ +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE + import os import cPickle diff --git a/util/filetype.py b/util/filetype.py index ea10b209a..c540c6013 100644 --- a/util/filetype.py +++ b/util/filetype.py @@ -1,3 +1,6 @@ +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE + import os from astrometry.util.shell import shell_escape diff --git a/util/fileutils.c b/util/fileutils.c index 90f334dd4..8d1aeea10 100644 --- a/util/fileutils.c +++ b/util/fileutils.c @@ -1,3 +1,7 @@ +/* +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE + */ #include #include diff --git a/util/find_data_file.py b/util/find_data_file.py index 1b19fed59..fc7004b97 100644 --- a/util/find_data_file.py +++ b/util/find_data_file.py @@ -1,3 +1,5 @@ +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE import os import os.path diff --git a/util/fit-wcs-main.c b/util/fit-wcs-main.c index f151f8af2..e6210f67f 100644 --- a/util/fit-wcs-main.c +++ b/util/fit-wcs-main.c @@ -1,3 +1,7 @@ +/* +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE + */ #include #include "starutil.h" diff --git a/util/fit-wcs.c b/util/fit-wcs.c index 783540d0a..f186088e0 100644 --- a/util/fit-wcs.c +++ b/util/fit-wcs.c @@ -1,20 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. - Copyright 2012 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include #include diff --git a/util/fits-column-merge.c b/util/fits-column-merge.c index dd4337152..7e09f7344 100644 --- a/util/fits-column-merge.c +++ b/util/fits-column-merge.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/util/fits-flip-endian.c b/util/fits-flip-endian.c index 761d9b645..f99e8e450 100644 --- a/util/fits-flip-endian.c +++ b/util/fits-flip-endian.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2008 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/util/fits.py b/util/fits.py index 4002ffe0a..a5b422e01 100644 --- a/util/fits.py +++ b/util/fits.py @@ -1,3 +1,6 @@ +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE + from __future__ import print_function import os class NoPyfits(object): diff --git a/util/fits2fits.py b/util/fits2fits.py index 40e3cba6a..0ebaa024b 100755 --- a/util/fits2fits.py +++ b/util/fits2fits.py @@ -1,4 +1,6 @@ #! /usr/bin/env python +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE import os import sys import re diff --git a/util/fitsbin.c b/util/fitsbin.c index 5153d5201..54b2c6a19 100644 --- a/util/fitsbin.c +++ b/util/fitsbin.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2007-2008 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/util/fitsfile.c b/util/fitsfile.c index b5b5f6b33..7a2db3284 100644 --- a/util/fitsfile.c +++ b/util/fitsfile.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2007-2008 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/util/fitsgetext.c b/util/fitsgetext.c index bc54aa5cd..dcf98f74a 100644 --- a/util/fitsgetext.c +++ b/util/fitsgetext.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/util/fitsioutils.c b/util/fitsioutils.c index 8457c0655..e42c583ad 100644 --- a/util/fitsioutils.c +++ b/util/fitsioutils.c @@ -1,20 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. - Copyright 2009 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include #include diff --git a/util/fitstable.c b/util/fitstable.c index eaa8d8680..d22068447 100644 --- a/util/fitstable.c +++ b/util/fitstable.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2008, 2009, 2010, 2011 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/util/fix_sdss_idr.py b/util/fix_sdss_idr.py index 130a838ec..cc742cee4 100644 --- a/util/fix_sdss_idr.py +++ b/util/fix_sdss_idr.py @@ -1,3 +1,5 @@ +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE import sys try: import pyfits diff --git a/util/gator.py b/util/gator.py index e103dd212..7a3ec04fd 100644 --- a/util/gator.py +++ b/util/gator.py @@ -1,3 +1,5 @@ +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE from .fits import text_table_fields def gator2fits(fn): diff --git a/util/get-healpix.c b/util/get-healpix.c index 5665dc38b..10f363fb4 100644 --- a/util/get-healpix.c +++ b/util/get-healpix.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/util/gslutils.c b/util/gslutils.c index f6c65ecb1..4d168c9d9 100644 --- a/util/gslutils.c +++ b/util/gslutils.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006-2008 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/util/healpix-diagram.py b/util/healpix-diagram.py index 0431e9d8c..436ee585b 100644 --- a/util/healpix-diagram.py +++ b/util/healpix-diagram.py @@ -1,18 +1,5 @@ # This file is part of the Astrometry.net suite. -# Copyright 2008 Dustin Lang. -# -# The Astrometry.net suite 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, version 2. -# -# The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# Licensed under a 3-clause BSD style license - see LICENSE from astrometry.util.util import * from astrometry.util.starutil_numpy import * diff --git a/util/healpix-map.py b/util/healpix-map.py index 26858d6b1..7f182ae88 100644 --- a/util/healpix-map.py +++ b/util/healpix-map.py @@ -1,3 +1,5 @@ +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE import matplotlib matplotlib.use('Agg') import pylab as plt diff --git a/util/healpix-utils.c b/util/healpix-utils.c index e6ed4e712..b49bc77c8 100644 --- a/util/healpix-utils.c +++ b/util/healpix-utils.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2009 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include "bl.h" diff --git a/util/healpix.c b/util/healpix.c index 9907e6145..a311a855e 100644 --- a/util/healpix.c +++ b/util/healpix.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006-2009 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/util/histogram.c b/util/histogram.c index de09d0d91..1220d2ee3 100644 --- a/util/histogram.c +++ b/util/histogram.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/util/histogram.h b/util/histogram.h index fbeced13f..51ea2737a 100644 --- a/util/histogram.h +++ b/util/histogram.h @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #ifndef HISTOGRAM_H diff --git a/util/histogram2d.c b/util/histogram2d.c index a362382a1..7e4aab192 100644 --- a/util/histogram2d.c +++ b/util/histogram2d.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2010, 2012 Dustin Lang - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/util/histogram2d.h b/util/histogram2d.h index 1426b4720..046881728 100644 --- a/util/histogram2d.h +++ b/util/histogram2d.h @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2010 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #ifndef HISTOGRAM2D_H diff --git a/util/hmstodeg.py b/util/hmstodeg.py index 8af87b407..b0c9633df 100755 --- a/util/hmstodeg.py +++ b/util/hmstodeg.py @@ -1,7 +1,8 @@ #! /usr/bin/env python +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE import sys -# from astrometry.util.starutil_numpy import * from starutil_numpy import * if __name__ == '__main__': diff --git a/util/horizons.py b/util/horizons.py index ab745b536..15acdcc27 100644 --- a/util/horizons.py +++ b/util/horizons.py @@ -1,3 +1,11 @@ +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE + +''' +This code allows one to interact with the JPL Horizons ephemeris +service via their telnet interface. Yes, telnet. +''' + # ohhhhhh yeahhhhh import telnetlib as tn diff --git a/util/hpimage.py b/util/hpimage.py deleted file mode 100644 index 199062976..000000000 --- a/util/hpimage.py +++ /dev/null @@ -1,112 +0,0 @@ -import sys - -from pylab import * -try: - import pyfits -except ImportError: - try: - from astropy.io import fits as pyfits - except ImportError: - raise ImportError("Cannot import either pyfits or astropy.io.fits") -from numpy import * - -from astrometry.util.healpix import * -from astrometry.util.sip import * -from astrometry.util.starutil_numpy import * -from astrometry.util.fits import * - -if __name__ == '__main__': - args = sys.argv[1:] - if len(args): - base = args[0] - else: - base = 'img' - imgfn = base + '.jpg' - wcsfn = base + '.wcs' - - img = imread(imgfn) - wcs = Sip(filename=wcsfn) - - if len(img.shape) == 3: - IH,IW,NC = img.shape - else: - NC = 1 - IH,IW = img.shape - img = img[:,:,newaxis] - - print 'img is', img.shape - print 'wcs is', wcs - - # arcsec/pix - pixscale = wcs.get_pixel_scale() - res = 1.2 - nside = healpix_nside_for_side_length_arcmin(pixscale / 60.) - nside = int(nside * res) - print 'Nside', nside - - (ralo, rahi, declo, dechi) = wcs.radec_bounds() - print 'radec bounds', ralo, rahi, declo, dechi - ras = array([ralo, ralo, rahi, rahi]) - #(ralo+rahi)/2 - decs = array([declo, dechi, declo, dechi]) - #(declo+dechi)/2 - xyzs = radectoxyz(ras, decs) - (N,nil) = xyzs.shape - hpxs,hpys = [],[] - for i in range(N): - xyz = xyzs[i,:] - x,y,z = xyz - (bighp, hpx, hpy) = xyztohealpixf(x,y,z, 1) - print 'radec', ras[i], decs[i] - print 'big hp', bighp - print 'hp x,y', hpx, hpy - hpxs.append(hpx) - hpys.append(hpy) - - hpxs,hpys = [],[] - for x,y in [(0,0),(0,IH),(IW,IH),(IW,0)]: - ra,dec = wcs.pixelxy2radec(x,y) - (bighp, hpx, hpy) = radectohealpixf(ra, dec, 1) - hpxs.append(hpx) - hpys.append(hpy) - print 'big hp:', bighp - - hpxlo,hpxhi = min(hpxs),max(hpxs) - hpylo,hpyhi = min(hpys),max(hpys) - - print 'hp range', hpxlo, hpxhi, hpylo, hpyhi - print 'hp pix:', nside*(hpxhi-hpxlo), nside*(hpyhi-hpylo) - - HW,HH = int(ceil(nside*(hpxhi-hpxlo))), int(ceil(nside*(hpyhi-hpylo))) - - xscale,yscale = (hpxhi-hpxlo)/float(HW), (hpyhi-hpylo)/float(HH) - Himg = zeros((NC,HH,HW)) - hxs = hpxlo + arange(HW) * xscale - hys = hpylo + arange(HH) * yscale - print 'hxs', min(hxs), max(hxs) - print 'hys', min(hys), max(hys) - nans = 0 - oobs = 0 - for hi,hx in enumerate(hxs): - print 'col', hi, 'of', len(hxs) - for hj,hy in enumerate(hys): - x,y,z = healpix_to_xyz(bighp, 1, hx, hy) - px,py = wcs.xyz2pixelxy(x,y,z) - if isnan(px) or isnan(py): - nans += 1 - continue - px = int(round(px)) - py = int(round(py)) - if px < 0 or px >= IW: - oobs += 1 - continue - if py < 0 or py >= IH: - oobs += 1 - continue - Himg[:, hj, hi] = img[py, px, :] - #break - print 'nans:', nans - print 'oobs:', oobs - p = pyfits.PrimaryHDU(Himg) - pyfits_writeto(p, base + '-hp.fits') - diff --git a/util/hpsplit.c b/util/hpsplit.c index 1c8b9c9b0..4c0db965c 100644 --- a/util/hpsplit.c +++ b/util/hpsplit.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2011, 2012, 2013 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/util/image2pnm.py b/util/image2pnm.py index 1caca4025..97b7e4a6f 100755 --- a/util/image2pnm.py +++ b/util/image2pnm.py @@ -1,8 +1,9 @@ #! /usr/bin/env python """ -Convert an image in a variety of formats into a pnm file +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE -Copyright Keir Mierle 2007, Dustin Lang 2008,2009 +Convert an image in a variety of formats into a pnm file """ import sys import os diff --git a/util/image2xy.c b/util/image2xy.c index a7e953f24..a8e552dab 100644 --- a/util/image2xy.c +++ b/util/image2xy.c @@ -1,20 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006-2008 Michael Blanton, Keir Mierle, David W. Hogg, - Sam Roweis and Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/util/imageutils.py b/util/imageutils.py index f49a3c643..3037566e9 100644 --- a/util/imageutils.py +++ b/util/imageutils.py @@ -1,3 +1,5 @@ +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE import numpy def write_pnm_to(img, f, maxval=255): diff --git a/util/index-demo.py b/util/index-demo.py index c0ffdadba..16c4d163f 100644 --- a/util/index-demo.py +++ b/util/index-demo.py @@ -1,4 +1,6 @@ #! /usr/bin/env python +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE import sys from astrometry.util.index import * diff --git a/util/index-mag-range.py b/util/index-mag-range.py index 161515a56..0ccf69330 100644 --- a/util/index-mag-range.py +++ b/util/index-mag-range.py @@ -1,3 +1,5 @@ +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE import matplotlib matplotlib.use('Agg') diff --git a/util/index-stats.py b/util/index-stats.py index 8e7793a3d..1b2163122 100755 --- a/util/index-stats.py +++ b/util/index-stats.py @@ -1,4 +1,6 @@ #! /usr/bin/env python +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE import matplotlib matplotlib.use('Agg') diff --git a/util/index.c b/util/index.c index 2326aa6d7..31af49c8d 100644 --- a/util/index.c +++ b/util/index.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include "index.h" diff --git a/util/index.py b/util/index.py index a120b1e9f..7f0893139 100644 --- a/util/index.py +++ b/util/index.py @@ -1,3 +1,5 @@ +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE from index_c import * from _index_util import * diff --git a/util/index_pyutils.c b/util/index_pyutils.c index b2bc2d99f..623fd1f3b 100644 --- a/util/index_pyutils.c +++ b/util/index_pyutils.c @@ -1,3 +1,7 @@ +/* +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE + */ #include "Python.h" // numpy - this should be in site-packages/numpy/core/include diff --git a/util/intmap.c b/util/intmap.c index f1d69b270..5f6b0e6a9 100644 --- a/util/intmap.c +++ b/util/intmap.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2009, 2012 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/util/ioutils.c b/util/ioutils.c index a409597f4..bb45ba5ac 100644 --- a/util/ioutils.c +++ b/util/ioutils.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/util/jpl.c b/util/jpl.c index 06768edc0..06d3cb846 100644 --- a/util/jpl.c +++ b/util/jpl.c @@ -1,4 +1,7 @@ - +/* +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE + */ #include diff --git a/util/jpl.h b/util/jpl.h index 74385955c..11df6440a 100644 --- a/util/jpl.h +++ b/util/jpl.h @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2010 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #ifndef JPL_H #define JPL_H diff --git a/util/jpl.py b/util/jpl.py index 545f824e1..94863b75f 100644 --- a/util/jpl.py +++ b/util/jpl.py @@ -1,3 +1,5 @@ +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE import re import datetime from astrometry.util.starutil_numpy import * diff --git a/util/lanczos.i b/util/lanczos.i index f59e12ff2..285551a8b 100644 --- a/util/lanczos.i +++ b/util/lanczos.i @@ -1,3 +1,7 @@ +/* +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE + */ static int LANCZOS_INTERP_FUNC(PyObject* np_ixi, PyObject* np_iyi, PyObject* np_dx, PyObject* np_dy, PyObject* loutputs, PyObject* linputs) { diff --git a/util/log.c b/util/log.c index 6f3044f6f..4fa5fa424 100644 --- a/util/log.c +++ b/util/log.c @@ -1,20 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2007 Keir Mierle - Copyright 2008-2011 Dustin Lang - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/util/lsqr.c b/util/lsqr.c deleted file mode 100644 index 270b04be7..000000000 --- a/util/lsqr.c +++ /dev/null @@ -1,910 +0,0 @@ -/* -* lsqr.c -* This is a C version of LSQR derived by James W. Howse -* from the Fortran 77 implementation of C. C. Paige and M. A. Saunders. -* -* This file defines functions for data type allocation and deallocation, -* lsqr itself (the main algorithm), -* and functions that scale, copy, and compute the Euclidean norm of a vector. -* -* -* The following history comments are maintained by Michael Saunders. -* -* 08 Sep 1999: First version of lsqr.c (this file) provided by -* James W. Howse . -* -* 16 Aug 2005: Forrester H Cole reports "too many" -"* iterations" when a good solution x0 is supplied in -* input->sol_vec. Note that the f77 and Matlab versions of LSQR -* intentionally don't allow x0 to be input. They require -* the user to define r0 = b - A*x0 and solve A dx = r0, -* then add x = x0 + dx. Note that nothing is gained unless -* larger stopping tolerances are set in the solve for dx -* (because dx doesn't need to be computed accurately if -* x0 is very good). The same is true here. BEWARE! -* -* 14 Feb 2006: Marc Grunberg reports successful -* use on a sparse system of size 1422805 x 246588 with -* 76993294 nonzero entries. Also reports that the solution -* vector isn't initialized(!). Added -* output->sol_vec->elements[indx] = 0.0; -* to the first for loop. -* -* Presumably you are supposed to provide x0 even if it is zero. -* Again, BEWARE! I feel it's another reason not to allow x0. -* -* 18 Mar 2007: Dima Sorkin reports long strings -* split across lines (fixed later by Krishna Mohan Gundu's -* script -- see 30 Aug 2007 below). -* Also recommends changing %i to %li for long ints. -* -* 05 Jul 2007: Joel Erickson reports bug in -* resid_tol and resid_tol_mach used in the stopping rules: -* output->mat_resid_norm should be -* output->frob_mat_norm in both. -* -* 30 Aug 2007: Krishna Mohan Gundu also reports -* long strings split across lines, and provides perl script -* fix_newlines.pl to change to the form "..." "...". -* The script is included in the sol/software/lsqr/c/ directory. -* It has been used to create this version of lsqr.c. -* -* Krishna also questioned the fact that the test program -* seems to fail on the last few rectangular cases. -* Don't worry! ||A'r|| is in fact quite small. -* atol and btol have been reduced from 1e-10 to 1e-15 -* to allow more iterations and hence "success". -* -* 02 Sep 2007 Macro "sqr" now defined to be "lsqr_sqr". -*/ - -#include "lsqr.h" - -/*-------------------------------------------------------------------------*/ -/* */ -/* Define the data type allocation and deallocation functions. */ -/* */ -/*-------------------------------------------------------------------------*/ - - /*---------------------------------------------------------------*/ - /* */ - /* Define the error handling function for LSQR and its */ - /* associated functions. */ - /* */ - /*---------------------------------------------------------------*/ - -void lsqr_error( char *msg, - int code ) -{ - fprintf(stderr, "\t%s\n", msg); - exit(code); -} - - /*---------------------------------------------------------------*/ - /* */ - /* Define the allocation function for a long vector with */ - /* subscript range x[0..n-1]. */ - /* */ - /*---------------------------------------------------------------*/ - -lvec *alloc_lvec( long lvec_size ) -{ - lvec *lng_vec; - - lng_vec = (lvec *) malloc( sizeof(lvec) ); - if (!lng_vec) lsqr_error("lsqr: vector allocation failure in function " -"alloc_lvec()", -1); - - lng_vec->elements = (long *) malloc( (lvec_size) * sizeof(long) ); - if (!lng_vec->elements) lsqr_error("lsqr: element allocation failure in " -"function alloc_lvec()", -1); - - lng_vec->length = lvec_size; - - return lng_vec; -} - - /*---------------------------------------------------------------*/ - /* */ - /* Define the deallocation function for the vector */ - /* created with the function 'alloc_lvec()'. */ - /* */ - /*---------------------------------------------------------------*/ - -void free_lvec( lvec *lng_vec ) -{ - free((double *) (lng_vec->elements)); - free((lvec *) (lng_vec)); - return; -} - - /*---------------------------------------------------------------*/ - /* */ - /* Define the allocation function for a double vector with */ - /* subscript range x[0..n-1]. */ - /* */ - /*---------------------------------------------------------------*/ - -dvec *alloc_dvec( long dvec_size ) -{ - dvec *dbl_vec; - - dbl_vec = (dvec *) malloc( sizeof(dvec) ); - if (!dbl_vec) lsqr_error("lsqr: vector allocation failure in function " -"alloc_dvec()", -1); - - dbl_vec->elements = (double *) malloc( (dvec_size) * sizeof(double) ); - if (!dbl_vec->elements) lsqr_error("lsqr: element allocation failure in " -"function alloc_dvec()", -1); - - dbl_vec->length = dvec_size; - - return dbl_vec; -} - - /*---------------------------------------------------------------*/ - /* */ - /* Define the deallocation function for the vector */ - /* created with the function 'alloc_dvec()'. */ - /* */ - /*---------------------------------------------------------------*/ - -void free_dvec( dvec *dbl_vec ) -{ - free((double *) (dbl_vec->elements)); - free((dvec *) (dbl_vec)); - return; -} - - /*---------------------------------------------------------------*/ - /* */ - /* Define the allocation function for all of the structures */ - /* used by the function 'lsqr()'. */ - /* */ - /*---------------------------------------------------------------*/ - -void alloc_lsqr_mem( lsqr_input **in_struct, - lsqr_output **out_struct, - lsqr_work **wrk_struct, - lsqr_func **fnc_struct, - long max_num_rows, - long max_num_cols ) -{ - *in_struct = (lsqr_input *) alloc_lsqr_in( max_num_rows, max_num_cols ); - if (!in_struct) lsqr_error("lsqr: input structure allocation failure in " -"function alloc_lsqr_in()", -1); - - *out_struct = (lsqr_output *) alloc_lsqr_out( max_num_rows, max_num_cols ); - if (!out_struct) lsqr_error("lsqr: output structure allocation failure in " -"function alloc_lsqr_out()", -1); - - (*out_struct)->sol_vec = (dvec *) (*in_struct)->sol_vec; - - *wrk_struct = (lsqr_work *) alloc_lsqr_wrk( max_num_rows, max_num_cols ); - if (!wrk_struct) lsqr_error("lsqr: work structure allocation failure in " -"function alloc_lsqr_wrk()", -1); - - *fnc_struct = (lsqr_func *) alloc_lsqr_fnc( ); - if (!fnc_struct) lsqr_error("lsqr: work structure allocation failure in " -"function alloc_lsqr_fnc()", -1); - - return; -} - - /*---------------------------------------------------------------*/ - /* */ - /* Define the deallocation function for the structure */ - /* created with the function 'alloc_lsqr_mem()'. */ - /* */ - /*---------------------------------------------------------------*/ - -void free_lsqr_mem( lsqr_input *in_struct, - lsqr_output *out_struct, - lsqr_work *wrk_struct, - lsqr_func *fnc_struct ) -{ - free_lsqr_in(in_struct); - free_lsqr_out(out_struct); - free_lsqr_wrk(wrk_struct); - free_lsqr_fnc(fnc_struct); - return; -} - - /*---------------------------------------------------------------*/ - /* */ - /* Define the allocation function for the structure of */ - /* type 'lsqr_input'. */ - /* */ - /*---------------------------------------------------------------*/ - -lsqr_input *alloc_lsqr_in( long max_num_rows, - long max_num_cols ) -{ - lsqr_input *in_struct; - - in_struct = (lsqr_input *) malloc( sizeof(lsqr_input) ); - if (!in_struct) lsqr_error("lsqr: input structure allocation failure in " -"function alloc_lsqr_in()", -1); - - in_struct->rhs_vec = (dvec *) alloc_dvec( max_num_rows ); - if (!in_struct->rhs_vec) lsqr_error("lsqr: right hand side vector \'b\' " -"allocation failure in function alloc_lsqr_in()", -1); - - in_struct->sol_vec = (dvec *) alloc_dvec( max_num_cols ); - if (!in_struct->sol_vec) lsqr_error("lsqr: solution vector \'x\' allocation " -"failure in function alloc_lsqr_in()", -1); - - return in_struct; -} - - /*---------------------------------------------------------------*/ - /* */ - /* Define the deallocation function for the structure */ - /* created with the function 'alloc_lsqr_in()'. */ - /* */ - /*---------------------------------------------------------------*/ - -void free_lsqr_in( lsqr_input *in_struct ) -{ - free_dvec(in_struct->rhs_vec); - free_dvec(in_struct->sol_vec); - free((lsqr_input *) (in_struct)); - return; -} - - /*---------------------------------------------------------------*/ - /* */ - /* Define the allocation function for the structure of */ - /* type 'lsqr_output'. */ - /* */ - /*---------------------------------------------------------------*/ - -lsqr_output *alloc_lsqr_out( long max_num_rows, - long max_num_cols ) -{ - lsqr_output *out_struct; - - out_struct = (lsqr_output *) malloc( sizeof(lsqr_output) ); - if (!out_struct) lsqr_error("lsqr: output structure allocation failure in " -"function alloc_lsqr_out()", -1); - - out_struct->std_err_vec = (dvec *) alloc_dvec( max_num_cols ); - if (!out_struct->std_err_vec) lsqr_error("lsqr: standard error vector \'e\' " -"allocation failure in function alloc_lsqr_out()", -1); - - return out_struct; -} - - /*---------------------------------------------------------------*/ - /* */ - /* Define the deallocation function for the structure */ - /* created with the function 'alloc_lsqr_out()'. */ - /* */ - /*---------------------------------------------------------------*/ - -void free_lsqr_out( lsqr_output *out_struct ) -{ - free_dvec(out_struct->std_err_vec); - free((lsqr_output *) (out_struct)); - return; -} - - /*---------------------------------------------------------------*/ - /* */ - /* Define the allocation function for the structure of */ - /* type 'lsqr_work'. */ - /* */ - /*---------------------------------------------------------------*/ - -lsqr_work *alloc_lsqr_wrk( long max_num_rows, - long max_num_cols ) -{ - lsqr_work *wrk_struct; - - wrk_struct = (lsqr_work *) malloc( sizeof(lsqr_work) ); - if (!wrk_struct) lsqr_error("lsqr: work structure allocation failure in " -"function alloc_lsqr_wrk()", -1); - - wrk_struct->bidiag_wrk_vec = (dvec *) alloc_dvec( max_num_cols ); - if (!wrk_struct->bidiag_wrk_vec) lsqr_error("lsqr: bidiagonalization work " -"vector \'v\' allocation failure in function alloc_lsqr_wrk()", -1); - - wrk_struct->srch_dir_vec = (dvec *) alloc_dvec( max_num_cols ); - if (!wrk_struct->srch_dir_vec) - lsqr_error("lsqr: search direction vector \'w\' " -"allocation failure in function alloc_lsqr_wrk()", -1); - - return wrk_struct; -} - - /*---------------------------------------------------------------*/ - /* */ - /* Define the deallocation function for the structure */ - /* created with the function 'alloc_lsqr_wrk()'. */ - /* */ - /*---------------------------------------------------------------*/ - -void free_lsqr_wrk( lsqr_work *wrk_struct ) -{ - free_dvec(wrk_struct->bidiag_wrk_vec); - free_dvec(wrk_struct->srch_dir_vec); - free((lsqr_work *) (wrk_struct)); - return; -} - - /*---------------------------------------------------------------*/ - /* */ - /* Define the allocation function for the structure of */ - /* type 'lsqr_func'. */ - /* */ - /*---------------------------------------------------------------*/ - -lsqr_func *alloc_lsqr_fnc( ) -{ - lsqr_func *fnc_struct; - - fnc_struct = (lsqr_func *) malloc( sizeof(lsqr_func) ); - if (!fnc_struct) lsqr_error("lsqr: function structure allocation failure in " -"function alloc_lsqr_fnc()", -1); - - return fnc_struct; -} - - /*---------------------------------------------------------------*/ - /* */ - /* Define the deallocation function for the structure */ - /* created with the function 'alloc_lsqr_fnc()'. */ - /* */ - /*---------------------------------------------------------------*/ - -void free_lsqr_fnc( lsqr_func *fnc_struct ) -{ - free((lsqr_func *) (fnc_struct)); - return; -} - -/*-------------------------------------------------------------------------*/ -/* */ -/* Define the LSQR function. */ -/* */ -/*-------------------------------------------------------------------------*/ - -/* -*------------------------------------------------------------------------------ -* -* LSQR finds a solution x to the following problems: -* -* 1. Unsymmetric equations -- solve A*x = b -* -* 2. Linear least squares -- solve A*x = b -* in the least-squares sense -* -* 3. Damped least squares -- solve ( A )*x = ( b ) -* ( damp*I ) ( 0 ) -* in the least-squares sense -* -* where 'A' is a matrix with 'm' rows and 'n' columns, 'b' is an -* 'm'-vector, and 'damp' is a scalar. (All quantities are real.) -* The matrix 'A' is intended to be large and sparse. -* -* -* Notation -* -------- -* -* The following quantities are used in discussing the subroutine -* parameters: -* -* 'Abar' = ( A ), 'bbar' = ( b ) -* ( damp*I ) ( 0 ) -* -* 'r' = b - A*x, 'rbar' = bbar - Abar*x -* -* 'rnorm' = sqrt( norm(r)**2 + damp**2 * norm(x)**2 ) -* = norm( rbar ) -* -* 'rel_prec' = the relative precision of floating-point arithmetic -* on the machine being used. Typically 2.22e-16 -* with 64-bit arithmetic. -* -* LSQR minimizes the function 'rnorm' with respect to 'x'. -* -* -* References -* ---------- -* -* C.C. Paige and M.A. Saunders, LSQR: An algorithm for sparse -* linear equations and sparse least squares, -* ACM Transactions on Mathematical Software 8, 1 (March 1982), -* pp. 43-71. -* -* C.C. Paige and M.A. Saunders, Algorithm 583, LSQR: Sparse -* linear equations and least-squares problems, -* ACM Transactions on Mathematical Software 8, 2 (June 1982), -* pp. 195-209. -* -* C.L. Lawson, R.J. Hanson, D.R. Kincaid and F.T. Krogh, -* Basic linear algebra subprograms for Fortran usage, -* ACM Transactions on Mathematical Software 5, 3 (Sept 1979), -* pp. 308-323 and 324-325. -* -*------------------------------------------------------------------------------ -*/ -void lsqr( lsqr_input *input, lsqr_output *output, lsqr_work *work, - lsqr_func *func, - void *prod, - int (*per_iteration_callback)(lsqr_input*, lsqr_output*, void* token), - void* token) -{ - double dvec_norm2( dvec * ); - - long indx, - term_iter, - term_iter_max; - - double alpha, - beta, - rhobar, - phibar, - bnorm, - bbnorm, - cs1, - sn1, - psi, - rho, - cs, - sn, - theta, - phi, - tau, - ddnorm, - delta, - gammabar, - zetabar, - gamma, - cs2, - sn2, - zeta, - xxnorm, - res, - resid_tol, - cond_tol, - resid_tol_mach, - temp, - stop_crit_1, - stop_crit_2, - stop_crit_3; - - static char term_msg[8][80] = - { - "The exact solution is x = x0", - "The residual Ax - b is small enough, given ATOL and BTOL", - "The least squares error is small enough, given ATOL", - "The estimated condition number has exceeded CONLIM", - "The residual Ax - b is small enough, given machine precision", - "The least squares error is small enough, given machine precision", - "The estimated condition number has exceeded machine precision", - "The iteration limit has been reached" - }; - - if( input->lsqr_fp_out != NULL ) - fprintf( input->lsqr_fp_out, " Least Squares Solution of A*x = b\n" -" The matrix A has %7li rows and %7li columns\n" -" The damping parameter is\tDAMP = %10.2e\n" -" ATOL = %10.2e\t\tCONDLIM = %10.2e\n" -" BTOL = %10.2e\t\tITERLIM = %10li\n\n", - input->num_rows, input->num_cols, input->damp_val, input->rel_mat_err, - input->cond_lim, input->rel_rhs_err, input->max_iter ); - - output->term_flag = 0; - term_iter = 0; - - output->num_iters = 0; - - output->frob_mat_norm = 0.0; - output->mat_cond_num = 0.0; - output->sol_norm = 0.0; - - for(indx = 0; indx < input->num_cols; indx++) - { - work->bidiag_wrk_vec->elements[indx] = 0.0; - work->srch_dir_vec->elements[indx] = 0.0; - output->std_err_vec->elements[indx] = 0.0; - output->sol_vec->elements[indx] = 0.0; - } - - bbnorm = 0.0; - ddnorm = 0.0; - xxnorm = 0.0; - - cs2 = -1.0; - sn2 = 0.0; - zeta = 0.0; - res = 0.0; - - if( input->cond_lim > 0.0 ) - cond_tol = 1.0 / input->cond_lim; - else - cond_tol = DBL_EPSILON; - - alpha = 0.0; - beta = 0.0; -/* -* Set up the initial vectors u and v for bidiagonalization. These satisfy -* the relations -* BETA*u = b - A*x0 -* ALPHA*v = A^T*u -*/ - /* Compute b - A*x0 and store in vector u which initially held vector b */ - dvec_scale( (-1.0), input->rhs_vec ); - func->mat_vec_prod( 0, input->sol_vec, input->rhs_vec, prod ); - dvec_scale( (-1.0), input->rhs_vec ); - - /* compute Euclidean length of u and store as BETA */ - beta = dvec_norm2( input->rhs_vec ); - - if( beta > 0.0 ) - { - /* scale vector u by the inverse of BETA */ - dvec_scale( (1.0 / beta), input->rhs_vec ); - - /* Compute matrix-vector product A^T*u and store it in vector v */ - func->mat_vec_prod( 1, work->bidiag_wrk_vec, input->rhs_vec, prod ); - - /* compute Euclidean length of v and store as ALPHA */ - alpha = dvec_norm2( work->bidiag_wrk_vec ); - } - - if( alpha > 0.0 ) - { - /* scale vector v by the inverse of ALPHA */ - dvec_scale( (1.0 / alpha), work->bidiag_wrk_vec ); - - /* copy vector v to vector w */ - dvec_copy( work->bidiag_wrk_vec, work->srch_dir_vec ); - } - - output->mat_resid_norm = alpha * beta; - output->resid_norm = beta; - bnorm = beta; -/* -* If the norm || A^T r || is zero, then the initial guess is the exact -* solution. Exit and report this. -*/ - if( (output->mat_resid_norm == 0.0) && (input->lsqr_fp_out != NULL) ) - { - fprintf( input->lsqr_fp_out, "\tISTOP = %3li\t\t\tITER = %9li\n" -" || A ||_F = %13.5e\tcond( A ) = %13.5e\n" -" || r ||_2 = %13.5e\t|| A^T r ||_2 = %13.5e\n" -" || b ||_2 = %13.5e\t|| x - x0 ||_2 = %13.5e\n\n", - output->term_flag, output->num_iters, output->frob_mat_norm, - output->mat_cond_num, output->resid_norm, output->mat_resid_norm, - bnorm, output->sol_norm ); - - fprintf( input->lsqr_fp_out, " %s\n\n", term_msg[output->term_flag]); - - return; - } - - rhobar = alpha; - phibar = beta; -/* -* If statistics are printed at each iteration, print a header and the initial -* values for each quantity. -*/ - if( input->lsqr_fp_out != NULL ) - { - fprintf( input->lsqr_fp_out, -" ITER || r || Compatible " -"||A^T r|| / ||A|| ||r|| || A || cond( A )\n\n" ); - - stop_crit_1 = 1.0; - stop_crit_2 = alpha / beta; - - fprintf( input->lsqr_fp_out, - "%6li %13.5e %10.2e \t%10.2e \t%10.2e %10.2e\n", - output->num_iters, output->resid_norm, stop_crit_1, stop_crit_2, - output->frob_mat_norm, output->mat_cond_num); - } - -/* -* The main iteration loop is continued as long as no stopping criteria -* are satisfied and the number of total iterations is less than some upper -* bound. -*/ - while( output->term_flag == 0 ) - { - output->num_iters++; -/* -* Perform the next step of the bidiagonalization to obtain -* the next vectors u and v, and the scalars ALPHA and BETA. -* These satisfy the relations -* BETA*u = A*v - ALPHA*u, -* ALFA*v = A^T*u - BETA*v. -*/ - /* scale vector u by the negative of ALPHA */ - dvec_scale( (-alpha), input->rhs_vec ); - - /* compute A*v - ALPHA*u and store in vector u */ - func->mat_vec_prod( 0, work->bidiag_wrk_vec, input->rhs_vec, prod ); - - /* compute Euclidean length of u and store as BETA */ - beta = dvec_norm2( input->rhs_vec ); - - /* accumulate this quantity to estimate Frobenius norm of matrix A */ - /* bbnorm += sqr(alpha) + sqr(beta) + sqr(input->damp_val);*/ - bbnorm += alpha*alpha + beta*beta - + input->damp_val*input->damp_val; - - if( beta > 0.0 ) - { - /* scale vector u by the inverse of BETA */ - dvec_scale( (1.0 / beta), input->rhs_vec ); - - /* scale vector v by the negative of BETA */ - dvec_scale( (-beta), work->bidiag_wrk_vec ); - - /* compute A^T*u - BETA*v and store in vector v */ - func->mat_vec_prod( 1, work->bidiag_wrk_vec, input->rhs_vec, prod ); - - /* compute Euclidean length of v and store as ALPHA */ - alpha = dvec_norm2( work->bidiag_wrk_vec ); - - if( alpha > 0.0 ) - /* scale vector v by the inverse of ALPHA */ - dvec_scale( (1.0 / alpha), work->bidiag_wrk_vec ); - } -/* -* Use a plane rotation to eliminate the damping parameter. -* This alters the diagonal (RHOBAR) of the lower-bidiagonal matrix. -*/ - cs1 = rhobar / sqrt( lsqr_sqr(rhobar) + lsqr_sqr(input->damp_val) ); - sn1 = input->damp_val - / sqrt( lsqr_sqr(rhobar) + lsqr_sqr(input->damp_val) ); - - psi = sn1 * phibar; - phibar = cs1 * phibar; -/* -* Use a plane rotation to eliminate the subdiagonal element (BETA) -* of the lower-bidiagonal matrix, giving an upper-bidiagonal matrix. -*/ - rho = sqrt( lsqr_sqr(rhobar) + lsqr_sqr(input->damp_val) - + lsqr_sqr(beta) ); - cs = sqrt( lsqr_sqr(rhobar) + lsqr_sqr(input->damp_val) ) / rho; - sn = beta / rho; - - theta = sn * alpha; - rhobar = -cs * alpha; - phi = cs * phibar; - phibar = sn * phibar; - tau = sn * phi; -/* -* Update the solution vector x, the search direction vector w, and the -* standard error estimates vector se. -*/ - for(indx = 0; indx < input->num_cols; indx++) - { - /* update the solution vector x */ - output->sol_vec->elements[indx] += (phi / rho) * - work->srch_dir_vec->elements[indx]; - - /* update the standard error estimates vector se */ - output->std_err_vec->elements[indx] += lsqr_sqr( (1.0 / rho) * - work->srch_dir_vec->elements[indx] ); - - /* accumulate this quantity to estimate condition number of A -*/ - ddnorm += lsqr_sqr( (1.0 / rho) * - work->srch_dir_vec->elements[indx] ); - - /* update the search direction vector w */ - work->srch_dir_vec->elements[indx] = - work->bidiag_wrk_vec->elements[indx] - - (theta / rho) * work->srch_dir_vec->elements[indx]; - } -/* -* Use a plane rotation on the right to eliminate the super-diagonal element -* (THETA) of the upper-bidiagonal matrix. Then use the result to estimate -* the solution norm || x ||. -*/ - delta = sn2 * rho; - gammabar = -cs2 * rho; - zetabar = (phi - delta * zeta) / gammabar; - - /* compute an estimate of the solution norm || x || */ - output->sol_norm = sqrt( xxnorm + lsqr_sqr(zetabar) ); - - gamma = sqrt( lsqr_sqr(gammabar) + lsqr_sqr(theta) ); - cs2 = gammabar / gamma; - sn2 = theta / gamma; - zeta = (phi - delta * zeta) / gamma; - - /* accumulate this quantity to estimate solution norm || x || */ - xxnorm += lsqr_sqr(zeta); -/* -* Estimate the Frobenius norm and condition of the matrix A, and the -* Euclidean norms of the vectors r and A^T*r. -*/ - output->frob_mat_norm = sqrt( bbnorm ); - output->mat_cond_num = output->frob_mat_norm * sqrt( ddnorm ); - - res += lsqr_sqr(psi); - output->resid_norm = sqrt( lsqr_sqr(phibar) + res ); - - output->mat_resid_norm = alpha * fabs( tau ); -/* -* Use these norms to estimate the values of the three stopping criteria. -*/ - stop_crit_1 = output->resid_norm / bnorm; - - stop_crit_2 = 0.0; - if( output->resid_norm > 0.0 ) - stop_crit_2 = output->mat_resid_norm / ( output->frob_mat_norm * - output->resid_norm ); - - stop_crit_3 = 1.0 / output->mat_cond_num; - -/* 05 Jul 2007: Bug reported by Joel Erickson . -*/ - resid_tol = input->rel_rhs_err + input->rel_mat_err * - output->frob_mat_norm * /* (not output->mat_resid_norm *) */ - output->sol_norm / bnorm; - - resid_tol_mach = DBL_EPSILON + DBL_EPSILON * - output->frob_mat_norm * /* (not output->mat_resid_norm *) */ - output->sol_norm / bnorm; -/* -* Check to see if any of the stopping criteria are satisfied. -* First compare the computed criteria to the machine precision. -* Second compare the computed criteria to the the user specified precision. -*/ - /* iteration limit reached */ - if( output->num_iters >= input->max_iter ) - output->term_flag = 7; - - /* condition number greater than machine precision */ - if( stop_crit_3 <= DBL_EPSILON ) - output->term_flag = 6; - /* least squares error less than machine precision */ - if( stop_crit_2 <= DBL_EPSILON ) - output->term_flag = 5; - /* residual less than a function of machine precision */ - if( stop_crit_1 <= resid_tol_mach ) - output->term_flag = 4; - - /* condition number greater than CONLIM */ - if( stop_crit_3 <= cond_tol ) - output->term_flag = 3; - /* least squares error less than ATOL */ - if( stop_crit_2 <= input->rel_mat_err ) - output->term_flag = 2; - /* residual less than a function of ATOL and BTOL */ - if( stop_crit_1 <= resid_tol ) - output->term_flag = 1; -/* -* If statistics are printed at each iteration, print a header and the initial -* values for each quantity. -*/ - if( input->lsqr_fp_out != NULL ) - { - fprintf( input->lsqr_fp_out, - "%6li %13.5e %10.2e \t%10.2e \t%10.2e %10.2e\n", - output->num_iters, output->resid_norm, stop_crit_1, - stop_crit_2, - output->frob_mat_norm, output->mat_cond_num); - } -/* -* The convergence criteria are required to be met on NCONV consecutive -* iterations, where NCONV is set below. Suggested values are 1, 2, or 3. -*/ - if( output->term_flag == 0 ) - term_iter = -1; - - term_iter_max = 1; - term_iter++; - - if( (term_iter < term_iter_max) && - (output->num_iters < input->max_iter) ) - output->term_flag = 0; - - if (per_iteration_callback) - per_iteration_callback(input, output, token); - - } /* end while loop */ -/* -* Finish computing the standard error estimates vector se. -*/ - temp = 1.0; - - if( input->num_rows > input->num_cols ) - temp = ( double ) ( input->num_rows - input->num_cols ); - - if( lsqr_sqr(input->damp_val) > 0.0 ) - temp = ( double ) ( input->num_rows ); - - temp = output->resid_norm / sqrt( temp ); - - for(indx = 0; indx < input->num_cols; indx++) - /* update the standard error estimates vector se */ - output->std_err_vec->elements[indx] = temp * - sqrt( output->std_err_vec->elements[indx] ); -/* -* If statistics are printed at each iteration, print the statistics for the -* stopping condition. -*/ - if( input->lsqr_fp_out != NULL ) - { - fprintf( input->lsqr_fp_out, "\n\tISTOP = %3li\t\t\tITER = %9li\n" -" || A ||_F = %13.5e\tcond( A ) = %13.5e\n" -" || r ||_2 = %13.5e\t|| A^T r ||_2 = %13.5e\n" -" || b ||_2 = %13.5e\t|| x - x0 ||_2 = %13.5e\n\n", - output->term_flag, output->num_iters, output->frob_mat_norm, - output->mat_cond_num, output->resid_norm, output->mat_resid_norm, - bnorm, output->sol_norm ); - - fprintf( input->lsqr_fp_out, " %s\n\n", term_msg[output->term_flag]); - - } - - return; -} - -/*-------------------------------------------------------------------------*/ -/* */ -/* Define the function 'dvec_norm2()'. This function takes a vector */ -/* arguement and computes the Euclidean or L2 norm of this vector. Note */ -/* that this is a version of the BLAS function 'dnrm2()' rewritten to */ -/* use the current data structures. */ -/* */ -/*-------------------------------------------------------------------------*/ - -double dvec_norm2(dvec *vec) -{ - long indx; - double norm; - - norm = 0.0; - - for(indx = 0; indx < vec->length; indx++) - norm += lsqr_sqr(vec->elements[indx]); - - return sqrt(norm); -} - - -/*-------------------------------------------------------------------------*/ -/* */ -/* Define the function 'dvec_scale()'. This function takes a vector */ -/* and a scalar as arguments and multiplies each element of the vector */ -/* by the scalar. Note that this is a version of the BLAS function */ -/* 'dscal()' rewritten to use the current data structures. */ -/* */ -/*-------------------------------------------------------------------------*/ - -void dvec_scale(double scal, dvec *vec) -{ - long indx; - - for(indx = 0; indx < vec->length; indx++) - vec->elements[indx] *= scal; - - return; -} - -/*-------------------------------------------------------------------------*/ -/* */ -/* Define the function 'dvec_copy()'. This function takes two vectors */ -/* as arguements and copies the contents of the first into the second. */ -/* Note that this is a version of the BLAS function 'dcopy()' rewritten */ -/* to use the current data structures. */ -/* */ -/*-------------------------------------------------------------------------*/ - -void dvec_copy(dvec *orig, dvec *copy) -{ - long indx; - - for(indx = 0; indx < orig->length; indx++) - copy->elements[indx] = orig->elements[indx]; - - return; -} diff --git a/util/lsqr.h b/util/lsqr.h deleted file mode 100644 index f9a928e50..000000000 --- a/util/lsqr.h +++ /dev/null @@ -1,402 +0,0 @@ -/* -* lsqr.h -* Contains auxiliary functions, data type definitions, and function -* prototypes for the iterative linear solver LSQR. -* -* 08 Sep 1999: First version from James W. Howse -* 02 Sep 2007: Dima Sorkin advises that -* in C++ the use of macros is strongly deprecated. -* Originally, sqr, max, min, round, TRUE, FALSE, PI -* were defined here. Now, -* min, round, TRUE, FALSE are gone (never used); -* PI is defined explicitly in test_lstp.c; -* max is changed to lsqr_max in test_lsqr.c; -*/ - -/* -*------------------------------------------------------------------------------ -* -* LSQR finds a solution x to the following problems: -* -* 1. Unsymmetric equations -- solve A*x = b -* -* 2. Linear least squares -- solve A*x = b -* in the least-squares sense -* -* 3. Damped least squares -- solve ( A )*x = ( b ) -* ( damp*I ) ( 0 ) -* in the least-squares sense -* -* where 'A' is a matrix with 'm' rows and 'n' columns, 'b' is an -* 'm'-vector, and 'damp' is a scalar. (All quantities are real.) -* The matrix 'A' is intended to be large and sparse. -* -* -* Notation -* -------- -* -* The following quantities are used in discussing the subroutine -* parameters: -* -* 'Abar' = ( A ), 'bbar' = ( b ) -* ( damp*I ) ( 0 ) -* -* 'r' = b - A*x, 'rbar' = bbar - Abar*x -* -* 'rnorm' = sqrt( norm(r)**2 + damp**2 * norm(x)**2 ) -* = norm( rbar ) -* -* 'rel_prec' = the relative precision of floating-point arithmetic -* on the machine being used. For example, on the IBM 370, -* 'rel_prec' is about 1.0E-6 and 1.0D-16 in single and double -* precision respectively. -* -* LSQR minimizes the function 'rnorm' with respect to 'x'. -* -*------------------------------------------------------------------------------ -*/ - -/*---------------*/ -/* Include files */ -/*---------------*/ - -#include -#include -#include -#include -#include - -/* 02 Sep 2007: The following 7 macros - sqr, max, min, round, TRUE, FALSE, PI - are no longer defined here. - (min, round, TRUE, FALSE were never used anyway.) - "sqr" has been changed to lsqr_sqr. -*/ - -/*------------------------*/ -/* User-defined functions */ -/*------------------------*/ - -#define lsqr_sqr(a) ( (a) * (a) ) -/* -#define max(a,b) ( (a) < (b) ? (b) : (a) ) -#define min(a,b) ( (a) < (b) ? (a) : (b) ) -#define round(a) ( (a) > 0.0 ? (int)((a) + 0.5) : (int)((a) - 0.5) ) -*/ - -/*----------------------*/ -/* Default declarations */ -/*----------------------*/ - -/* -#define TRUE (1) -#define FALSE (0) -#define PI (4.0 * atan(1.0)) -*/ - -/*------------------*/ -/* Type definitions */ -/*------------------*/ - -typedef struct LONG_VECTOR { - long length; - long *elements; -} lvec; - -typedef struct DOUBLE_VECTOR { - long length; - double *elements; -} dvec; - -/* -*------------------------------------------------------------------------------ -* -* Input Quantities -* ---------------- -* -* num_rows input The number of rows (e.g., 'm') in the matrix A. -* -* num_cols input The number of columns (e.g., 'n') in the matrix A. -* -* damp_val input The damping parameter for problem 3 above. -* ('damp_val' should be 0.0 for problems 1 and 2.) -* If the system A*x = b is incompatible, values -* of 'damp_val' in the range -* 0 to sqrt('rel_prec')*norm(A) -* will probably have a negligible effect. -* Larger values of 'damp_val' will tend to decrease -* the norm of x and reduce the number of -* iterations required by LSQR. -* -* The work per iteration and the storage needed -* by LSQR are the same for all values of 'damp_val'. -* -* rel_mat_err input An estimate of the relative error in the data -* defining the matrix 'A'. For example, -* if 'A' is accurate to about 6 digits, set -* rel_mat_err = 1.0e-6 . -* -* rel_rhs_err input An extimate of the relative error in the data -* defining the right hand side (rhs) vector 'b'. For -* example, if 'b' is accurate to about 6 digits, set -* rel_rhs_err = 1.0e-6 . -* -* cond_lim input An upper limit on cond('Abar'), the apparent -* condition number of the matrix 'Abar'. -* Iterations will be terminated if a computed -* estimate of cond('Abar') exceeds 'cond_lim'. -* This is intended to prevent certain small or -* zero singular values of 'A' or 'Abar' from -* coming into effect and causing unwanted growth -* in the computed solution. -* -* 'cond_lim' and 'damp_val' may be used separately or -* together to regularize ill-conditioned systems. -* -* Normally, 'cond_lim' should be in the range -* 1000 to 1/rel_prec. -* Suggested value: -* cond_lim = 1/(100*rel_prec) for compatible systems, -* cond_lim = 1/(10*sqrt(rel_prec)) for least squares. -* -* Note: If the user is not concerned about the parameters -* 'rel_mat_err', 'rel_rhs_err' and 'cond_lim', any or all of them -* may be set to zero. The effect will be the same as the values -* 'rel_prec', 'rel_prec' and 1/rel_prec respectively. -* -* max_iter input An upper limit on the number of iterations. -* Suggested value: -* max_iter = n/2 for well-conditioned systems -* with clustered singular values, -* max_iter = 4*n otherwise. -* -* lsqr_fp_out input Pointer to the file for sending printed output. If -* not NULL, a summary will be printed to the file that -* 'lsqr_fp_out' points to. -* -* rhs_vec input The right hand side (rhs) vector 'b'. This vector -* has a length of 'm' (i.e., 'num_rows'). The routine -* LSQR is designed to over-write 'rhs_vec'. -* -* sol_vec input The initial guess for the solution vector 'x'. This -* vector has a length of 'n' (i.e., 'num_cols'). The -* routine LSQR is designed to over-write 'sol_vec'. -* -*------------------------------------------------------------------------------ -*/ - -typedef struct LSQR_INPUTS { - long num_rows; - long num_cols; - double damp_val; - double rel_mat_err; - double rel_rhs_err; - double cond_lim; - long max_iter; - FILE *lsqr_fp_out; - dvec *rhs_vec; - dvec *sol_vec; -} lsqr_input; - -/* -*------------------------------------------------------------------------------ -* -* Output Quantities -* ----------------- -* -* term_flag output An integer giving the reason for termination: -* -* 0 x = x0 is the exact solution. -* No iterations were performed. -* -* 1 The equations A*x = b are probably compatible. -* Norm(A*x - b) is sufficiently small, given the -* values of 'rel_mat_err' and 'rel_rhs_err'. -* -* 2 The system A*x = b is probably not -* compatible. A least-squares solution has -* been obtained that is sufficiently accurate, -* given the value of 'rel_mat_err'. -* -* 3 An estimate of cond('Abar') has exceeded -* 'cond_lim'. The system A*x = b appears to be -* ill-conditioned. Otherwise, there could be an -* error in subroutine APROD. -* -* 4 The equations A*x = b are probably -* compatible. Norm(A*x - b) is as small as -* seems reasonable on this machine. -* -* 5 The system A*x = b is probably not -* compatible. A least-squares solution has -* been obtained that is as accurate as seems -* reasonable on this machine. -* -* 6 Cond('Abar') seems to be so large that there is -* no point in doing further iterations, -* given the precision of this machine. -* There could be an error in subroutine APROD. -* -* 7 The iteration limit 'max_iter' was reached. -* -* num_iters output The number of iterations performed. -* -* frob_mat_norm output An estimate of the Frobenius norm of 'Abar'. -* This is the square-root of the sum of squares -* of the elements of 'Abar'. -* If 'damp_val' is small and if the columns of 'A' -* have all been scaled to have length 1.0, -* 'frob_mat_norm' should increase to roughly -* sqrt('n'). -* A radically different value for 'frob_mat_norm' -* may indicate an error in subroutine APROD (there -* may be an inconsistency between modes 1 and 2). -* -* mat_cond_num output An estimate of cond('Abar'), the condition -* number of 'Abar'. A very high value of -* 'mat_cond_num' -* may again indicate an error in APROD. -* -* resid_norm output An estimate of the final value of norm('rbar'), -* the function being minimized (see notation -* above). This will be small if A*x = b has -* a solution. -* -* mat_resid_norm output An estimate of the final value of -* norm( Abar(transpose)*rbar ), the norm of -* the residual for the usual normal equations. -* This should be small in all cases. -* ('mat_resid_norm' -* will often be smaller than the true value -* computed from the output vector 'x'.) -* -* sol_norm output An estimate of the norm of the final -* solution vector 'x'. -* -* sol_vec output The vector which returns the computed solution -* 'x'. -* This vector has a length of 'n' (i.e., -* 'num_cols'). -* -* std_err_vec output The vector which returns the standard error -* estimates for the components of 'x'. -* This vector has a length of 'n' -* (i.e., 'num_cols'). For each i, std_err_vec(i) -* is set to the value -* 'resid_norm' * sqrt( sigma(i,i) / T ), -* where sigma(i,i) is an estimate of the i-th -* diagonal of the inverse of Abar(transpose)*Abar -* and T = 1 if m <= n, -* T = m - n if m > n and damp_val = 0, -* T = m if damp_val != 0. -* -*------------------------------------------------------------------------------ -*/ - -typedef struct LSQR_OUTPUTS { - long term_flag; - long num_iters; - double frob_mat_norm; - double mat_cond_num; - double resid_norm; - double mat_resid_norm; - double sol_norm; - dvec *sol_vec; - dvec *std_err_vec; -} lsqr_output; - -/* -*------------------------------------------------------------------------------ -* -* Workspace Quantities -* -------------------- -* -* bidiag_wrk_vec workspace This float vector is a workspace for the -* current iteration of the -* Lanczos bidiagonalization. -* This vector has length 'n' (i.e., 'num_cols'). -* -* srch_dir_vec workspace This float vector contains the search direction -* at the current iteration. This vector has a -* length of 'n' (i.e., 'num_cols'). -* -*------------------------------------------------------------------------------ -*/ - -typedef struct LSQR_WORK { - dvec *bidiag_wrk_vec; - dvec *srch_dir_vec; -} lsqr_work; - -/* -*------------------------------------------------------------------------------ -* -* Functions Called -* ---------------- -* -* mat_vec_prod functions A pointer to a function that performs the -* matrix-vector multiplication. The function -* has the calling parameters: -* -* APROD ( mode, x, y, prod_data ), -* -* and it must perform the following functions: -* -* If MODE = 0, compute y = y + A*x, -* If MODE = 1, compute x = x + A^T*y. -* -* The vectors x and y are input parameters in -* both cases. -* If mode = 0, y should be altered without -* changing x. -* If mode = 1, x should be altered without -* changing y. -* The argument prod_data is a pointer to a -* user-defined structure that contains -* any data need by the function APROD that is -* not used by LSQR. If no additional data is -* needed by APROD, then prod_data should be -* the NULL pointer. -*------------------------------------------------------------------------------ -*/ - -typedef struct LSQR_FUNC { - void (*mat_vec_prod) (long, dvec *, dvec *, void *); -} lsqr_func; - -/*---------------------*/ -/* Function prototypes */ -/*---------------------*/ - -void lsqr_error( char *, int ); - -lvec *alloc_lvec( long ); -void free_lvec( lvec * ); - -dvec *alloc_dvec( long ); -void free_dvec( dvec * ); - -void alloc_lsqr_mem( lsqr_input **, lsqr_output **, lsqr_work **, lsqr_func **, - long, long ); -void free_lsqr_mem( lsqr_input *, lsqr_output *, lsqr_work *, lsqr_func * ); - -lsqr_input *alloc_lsqr_in( long, long ); -void free_lsqr_in( lsqr_input * ); - -lsqr_output *alloc_lsqr_out( long, long ); -void free_lsqr_out( lsqr_output * ); - -lsqr_work *alloc_lsqr_wrk( long, long ); -void free_lsqr_wrk( lsqr_work * ); - -lsqr_func *alloc_lsqr_fnc( ); -void free_lsqr_fnc( lsqr_func * ); - -void lsqr( lsqr_input *, lsqr_output *, lsqr_work *, lsqr_func *, void *, - int (*per_iteration_callback)(lsqr_input*, lsqr_output*, void* token), - void* token); - -double dvec_norm2( dvec * ); -void dvec_scale( double, dvec * ); -void dvec_copy( dvec *, dvec * ); - diff --git a/util/lsqr_c.README b/util/lsqr_c.README deleted file mode 100644 index 40e57b758..000000000 --- a/util/lsqr_c.README +++ /dev/null @@ -1,64 +0,0 @@ -lsqr_c.README - -The software for LSQR (C version) is provided by SOL, Stanford University -under the terms of the OSI Common Public License (CPL): -http://www.opensource.org/licenses/cpl1.0.php - - -08 Sep 1999: First set of files provided by James W. Howse . - -11 Oct 2000: Files unpacked by Michael Saunders. - Lines longer than 80 characters had extraneous carriage returns. - Tried to repair them, but not sure if I/O formats will be correct. - -09 Dec 2005: Beware that this C version of LSQR allows x0 to be input. - I RECOMMEND THAT YOU ALWAYS USE x0 = 0 (an n-vector of zeros). - - Otherwise, you must be conscious of the fact that LSQR will be - solving A dx = r0 = b - A x0 and adding parts of dx to x0 - AS IT GOES. If x0 is very close to a solution (that is, if dx - is very small compared to x0), many digits of accuracy in dx - will be lost. It is safer to solve A dx = r0 (with x0 = 0) - and then compute x = x0 + dx yourself at the end. - - In either case, providing x0 will generally not save work - (will not reduce the number of LSQR iterations) unless you - use larger tolerances atol and btol than you would for Ax = b. - -31 Aug 2007: Some bugs fixed (see lsqr.c). - Note that some of the rectangular test problems - at the end of test_prog.c are really too ill-conditioned - for any least-squares method to give an accurate solution. - Ignore the "LSQR seems to have failed" messages if ||A'r|| - is quite small. - -31 Aug 2007: Simplified C version of LSQR contributed by - Michael Friedlander. Added as clsqr2 to - http://www.stanford.edu/group/SOL/lsqr.html - -02 Aug 2007: Dima Sorkin recommends changes - to improve portability. Also the following compile command: - gcc -ansi -pedantic -Wall -c lsqr.c - -Please send comments to Michael Saunders, SOL, Stanford University - saunders@stanford.edu 650-723-1875 ------------------------------------------------------------------------------ - -The C version of LSQR involves the following files: - - lsqr.c - lsqr.h - makefile - test_lsqr.c - test_lsqr.h - test_lstp.c - test_mult.c - test_prog.c - -test_lstp.c contains lstp, a least-square test problem generator. - It constructs data for a matrix A and a vector b. -test_mult.c computes products Ax and A'y. -test_lsqr.c calls lstp to generate a problem, - then calls lsqr to solve it. -test_prog.c calls test_lsqr several times to generate and solve - various problems. diff --git a/util/lsstutils.py b/util/lsstutils.py deleted file mode 100644 index 7f7cdfd6f..000000000 --- a/util/lsstutils.py +++ /dev/null @@ -1,57 +0,0 @@ -from lsst.afw.detection import SourceSet, Source -from astrometry.util.fits import * - -sourceset_fields = ['FlagForDetection', "XAstrom", "XAstromErr", "YAstrom", "YAstromErr", - "PsfFlux", "ApFlux", "Ixx", "IxxErr", "Iyy", - "IyyErr", "Ixy", "IxyErr"] - -# eg, from astrometry.util.fits : fits_table() or text_table() -def sourceset_from_table(t): - N = len(t) - ss = SourceSet() - for i in range(N): - s = Source() - ss.push_back(s) - for f in sourceset_fields: - vals = t.getcolumn(f.lower()) - for s,v in zip(ss,vals): - fname = "set" + f - func = getattr(s, fname) - if func is None: - raise Exception('Function not found in Source object: ' + fname + ', object %s' % str(s)) - func(v) - return ss - - -def sourceset_to_dict(ss): - d = dict() - for f in sourceset_fields: - vals = [] - for s in ss: - func = getattr(s, "get" + f) - vals.append(func()) - d[f] = vals - return d - -def sourceset_to_table(ss): - sd = sourceset_to_dict(ss) - td = tabledata() - for k,v in sd.items(): - td.set(k, array(v)) - return td - -def sourceset_from_dict(d): - x = d[sourceset_fields[0]] - N = len(x) - ss = SourceSet() - for i in range(N): - s = Source() - ss.push_back(s) - - for f in sourceset_fields: - vals = d[f] - for s,v in zip(ss,vals): - func = getattr(s, "set" + f) - func(v) - - return ss diff --git a/util/make-wcs.py b/util/make-wcs.py index 6d78bdbd6..5678828a6 100755 --- a/util/make-wcs.py +++ b/util/make-wcs.py @@ -1,4 +1,6 @@ #! /usr/bin/env python +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE import sys from optparse import OptionParser from astrometry.util.util import * diff --git a/util/makefile-bl b/util/makefile-bl deleted file mode 100644 index 60fccacbc..000000000 --- a/util/makefile-bl +++ /dev/null @@ -1,23 +0,0 @@ -# This file is part of the Astrometry.net suite. -# Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. -# -# The Astrometry.net suite 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, version 2. -# -# The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -all: test - -test: test-main.o test_bl.o test_bt.o cutest.o bl.o bt.o - $(CC) -o $@ $^ - -test-main.c: test_bl.c test_bt.c - /bin/sh make-tests.sh $^ > $@ diff --git a/util/makefile.anbase b/util/makefile.anbase index 07667db69..a7c0b9238 100644 --- a/util/makefile.anbase +++ b/util/makefile.anbase @@ -1,3 +1,5 @@ +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE ANBASE_DIR := $(BASEDIR)/util ANBASE_LIB_FILE := $(ANBASE_DIR)/libanbase.a diff --git a/util/makefile.anfiles b/util/makefile.anfiles index ffa320cda..a4689d696 100644 --- a/util/makefile.anfiles +++ b/util/makefile.anfiles @@ -1,18 +1,5 @@ # This file is part of the Astrometry.net suite. -# Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. -# -# The Astrometry.net suite 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, version 2. -# -# The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# Licensed under a 3-clause BSD style license - see LICENSE ANFILES_DIR := $(BASEDIR)/util ANFILES_INC := diff --git a/util/makefile.anutils b/util/makefile.anutils index a7c16925d..98a46c0e6 100644 --- a/util/makefile.anutils +++ b/util/makefile.anutils @@ -1,18 +1,5 @@ # This file is part of the Astrometry.net suite. -# Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. -# -# The Astrometry.net suite 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, version 2. -# -# The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# Licensed under a 3-clause BSD style license - see LICENSE ANUTILS_DIR := $(BASEDIR)/util ANUTILS_LIB_FILE := $(ANUTILS_DIR)/libanutils.a diff --git a/util/makefile.blind b/util/makefile.blind index 127a2f734..ecbebb634 100644 --- a/util/makefile.blind +++ b/util/makefile.blind @@ -1,18 +1,5 @@ # This file is part of the Astrometry.net suite. -# Copyright 2009 Dustin Lang. -# -# The Astrometry.net suite 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, version 2. -# -# The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# Licensed under a 3-clause BSD style license - see LICENSE BLIND_DIR := $(BASEDIR)/blind BLIND_INC := -I$(BLIND_DIR) diff --git a/util/makefile.cairo b/util/makefile.cairo index 4ed006360..d22f3be31 100644 --- a/util/makefile.cairo +++ b/util/makefile.cairo @@ -1,18 +1,5 @@ # This file is part of the Astrometry.net suite. -# Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. -# -# The Astrometry.net suite 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, version 2. -# -# The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# Licensed under a 3-clause BSD style license - see LICENSE CAIRO_INC ?= $(shell pkg-config --cflags cairo 2>/dev/null) CAIRO_LIB ?= $(shell pkg-config --libs cairo 2>/dev/null) diff --git a/util/makefile.cfitsio b/util/makefile.cfitsio index 34c0ce0e0..86ca1c44d 100644 --- a/util/makefile.cfitsio +++ b/util/makefile.cfitsio @@ -1,18 +1,5 @@ # This file is part of the Astrometry.net suite. -# Copyright 2013 Dustin Lang. -# -# The Astrometry.net suite 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, version 2. -# -# The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# Licensed under a 3-clause BSD style license - see LICENSE # if CFITS_INC environment variable is set, assume CFITS_EXISTS. # Note also that CFITS_EXISTS can be overridden by the environment. diff --git a/util/makefile.common b/util/makefile.common index a544a8c8a..0fb845d37 100644 --- a/util/makefile.common +++ b/util/makefile.common @@ -1,19 +1,5 @@ # This file is part of the Astrometry.net suite. -# Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. -# Copyright 2010, 2012 Dustin Lang. -# -# The Astrometry.net suite 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, version 2. -# -# The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# Licensed under a 3-clause BSD style license - see LICENSE INCLUDE_BASE_DIR := $(BASEDIR)/include INCLUDE_DIR := $(INCLUDE_BASE_DIR)/astrometry diff --git a/util/makefile.deps b/util/makefile.deps index de3ce6b8a..79970b124 100644 --- a/util/makefile.deps +++ b/util/makefile.deps @@ -1,18 +1,5 @@ # This file is part of the Astrometry.net suite. -# Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. -# -# The Astrometry.net suite 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, version 2. -# -# The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# Licensed under a 3-clause BSD style license - see LICENSE # Dependencies: DEPS := $(subst .o,.dep,$(DEP_OBJ)) diff --git a/util/makefile.gsl b/util/makefile.gsl index f65f05057..cb7831f63 100644 --- a/util/makefile.gsl +++ b/util/makefile.gsl @@ -1,18 +1,5 @@ # This file is part of the Astrometry.net suite. -# Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. -# -# The Astrometry.net suite 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, version 2. -# -# The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# Licensed under a 3-clause BSD style license - see LICENSE # On by default? This doesn't seem to work #SYSTEM_GSL ?= $(shell pkg-config --modversion gsl >/dev/null 2>/dev/null && echo yes) diff --git a/util/makefile.libkd b/util/makefile.libkd index 6b5055231..e8dfd7c41 100644 --- a/util/makefile.libkd +++ b/util/makefile.libkd @@ -1,18 +1,5 @@ # This file is part of the Astrometry.net suite. -# Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. -# -# The Astrometry.net suite 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, version 2. -# -# The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# Licensed under a 3-clause BSD style license - see LICENSE LIBKD_DIR := $(BASEDIR)/libkd LIBKD_LIB_FILE := $(LIBKD_DIR)/libkd.a diff --git a/util/makefile.netpbm b/util/makefile.netpbm index 46a926567..96f6d2db8 100644 --- a/util/makefile.netpbm +++ b/util/makefile.netpbm @@ -1,18 +1,5 @@ # This file is part of the Astrometry.net suite. -# Copyright 2007 Dustin Lang. -# -# The Astrometry.net suite 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, version 2. -# -# The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# Licensed under a 3-clause BSD style license - see LICENSE NETPBM_INC ?= NETPBM_LIB ?= -L. -lnetpbm diff --git a/util/makefile.png b/util/makefile.png index ccd889828..fb34c8315 100644 --- a/util/makefile.png +++ b/util/makefile.png @@ -1,18 +1,5 @@ # This file is part of the Astrometry.net suite. -# Copyright 2007 Dustin Lang. -# -# The Astrometry.net suite 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, version 2. -# -# The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# Licensed under a 3-clause BSD style license - see LICENSE PNG_INC ?= $(shell pkg-config --cflags libpng 2>/dev/null) PNG_LIB ?= $(shell pkg-config --libs libpng 2>/dev/null) diff --git a/util/makefile.qfits b/util/makefile.qfits index 48d78a2d7..d40ac5493 100644 --- a/util/makefile.qfits +++ b/util/makefile.qfits @@ -1,18 +1,5 @@ # This file is part of the Astrometry.net suite. -# Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. -# -# The Astrometry.net suite 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, version 2. -# -# The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# Licensed under a 3-clause BSD style license - see LICENSE QFITS_DIR := $(BASEDIR)/qfits-an QFITS_LIB_FILE := $(QFITS_DIR)/libqfits.a diff --git a/util/makefile.tests b/util/makefile.tests index d4b14b0d8..013e0b6ef 100644 --- a/util/makefile.tests +++ b/util/makefile.tests @@ -1,18 +1,5 @@ # This file is part of the Astrometry.net suite. -# Copyright 2008 Dustin Lang. -# -# The Astrometry.net suite 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, version 2. -# -# The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# Licensed under a 3-clause BSD style license - see LICENSE ### First, define these variables in your Makefile. diff --git a/util/makefile.wcslib b/util/makefile.wcslib index 9748b8d93..e4f2a135b 100644 --- a/util/makefile.wcslib +++ b/util/makefile.wcslib @@ -1,18 +1,5 @@ # This file is part of the Astrometry.net suite. -# Copyright 2007, 2010 Dustin Lang. -# -# The Astrometry.net suite 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, version 2. -# -# The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# Licensed under a 3-clause BSD style license - see LICENSE # WCSLIB is (supposed to be) optional. diff --git a/util/makefile.zlib b/util/makefile.zlib index 5288304c8..f4b44524b 100644 --- a/util/makefile.zlib +++ b/util/makefile.zlib @@ -1,18 +1,5 @@ # This file is part of the Astrometry.net suite. -# Copyright 2010 Dustin Lang. -# -# The Astrometry.net suite 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, version 2. -# -# The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# Licensed under a 3-clause BSD style license - see LICENSE ZLIB_INC ?= $(shell pkg-config --cflags zlib 2>/dev/null) ZLIB_LIB ?= $(shell pkg-config --libs zlib 2>/dev/null || echo "-lz") diff --git a/util/matchfile_to_wcs.py b/util/matchfile_to_wcs.py index 2e37411d7..1d9498db4 100644 --- a/util/matchfile_to_wcs.py +++ b/util/matchfile_to_wcs.py @@ -1,3 +1,5 @@ +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE try: import pyfits except ImportError: diff --git a/util/mathutil.c b/util/mathutil.c index 94dcd037d..2f282785c 100644 --- a/util/mathutil.c +++ b/util/mathutil.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/util/mcmc.py b/util/mcmc.py deleted file mode 100644 index f4b7ca46b..000000000 --- a/util/mcmc.py +++ /dev/null @@ -1,80 +0,0 @@ -from numpy import * - -def metropolis(data, model, nlinks, beta=1., keepchain=True, startlink=0): - ''' - The "model" object must implement: - - p = model.get_params() - -- this must return an *independent copy* of the parameters. - - model.set_params(p) - - p = model.propose_params() - - model.tally(accept, linknumber) accept: boolean - - lnp = model.lnposterior(data) - - - The "data" object is an opaque object that just gets passed back to you - - Returns: (bestlnp, bestparams, chain) - - Where chain is a list of all the MCMC steps: - [ (lnp, params), (lnp, params), ... ] - - ''' - oldparams = model.get_params() - oldlnp = model.lnposterior(data) - - bestparams = oldparams - bestlnp = oldlnp - - chain = [] - for link in range(startlink, nlinks): - - newparams = model.propose_params() - model.set_params(newparams) - newlnp = model.lnposterior(data) - - randnum = random.uniform() - accept = (beta * (newlnp - oldlnp)) > log(randnum) - - model.tally(accept, link) - - if accept: - # keep new parameters - if keepchain: - chain.append((newlnp, newparams)) - oldparams = newparams - oldlnp = newlnp - #naccept += 1 - if newlnp > bestlnp: - bestlnp = newlnp - bestparams = newparams - else: - # keep old parameters - if keepchain: - chain.append((oldlnp, oldparams)) - model.set_params(oldparams) - - return (bestlnp, bestparams, chain) - -''' -def cycle_proposals(oldparams, stepinfo): - (stepnum, sigmas, lastip) = stepinfo - NZ = array([i for i,s in enumerate(sigmas) if s != 0]) - np = len(NZ) - ip = NZ[stepnum % np] - params = oldparams[:] - params[ip] += random.normal() * sigmas[ip] - return (params, (stepnum+1, sigmas, ip)) - -# roll-off a quadratic error function to linear at the given 'linsig'. -# the curve and its slope are continuous. -def quadratic_to_linear(sig2, linsig): - lin = (sig2 > linsig**2) - sig2[lin] = -linsig**2 + 2.*linsig * sqrt(sig2[lin]) - return sig2 - -''' diff --git a/util/md5.c b/util/md5.c index e8aaf8d60..8959373d5 100644 --- a/util/md5.c +++ b/util/md5.c @@ -1,63 +1,43 @@ /* * RFC 1321 compliant MD5 implementation * - * Copyright (C) 2006-2007 Christophe Devine + * Copyright (C) 2001-2003 Christophe Devine * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License, version 2.1 as published by the Free Software Foundation. + * 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 of the License, or + * (at your option) any later version. * - * This library is distributed in the hope that it will be useful, + * 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 - * Lesser General Public License for more details. + * 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 Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, - * MA 02110-1301 USA + * 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 */ -/* - * The MD5 algorithm was designed by Ron Rivest in 1991. - * - * http://www.ietf.org/rfc/rfc1321.txt - */ - -#ifndef _CRT_SECURE_NO_DEPRECATE -#define _CRT_SECURE_NO_DEPRECATE 1 -#endif #include -#include #include "md5.h" -/* - * 32-bit integer manipulation macros (little endian) - */ -#ifndef GET_UINT32_LE -#define GET_UINT32_LE(n,b,i) \ -{ \ - (n) = ( (unsigned long) (b)[(i) ] ) \ - | ( (unsigned long) (b)[(i) + 1] << 8 ) \ - | ( (unsigned long) (b)[(i) + 2] << 16 ) \ - | ( (unsigned long) (b)[(i) + 3] << 24 ); \ +#define GET_UINT32(n,b,i) \ +{ \ + (n) = ( (uint32) (b)[(i) ] ) \ + | ( (uint32) (b)[(i) + 1] << 8 ) \ + | ( (uint32) (b)[(i) + 2] << 16 ) \ + | ( (uint32) (b)[(i) + 3] << 24 ); \ } -#endif -#ifndef PUT_UINT32_LE -#define PUT_UINT32_LE(n,b,i) \ -{ \ - (b)[(i) ] = (unsigned char) ( (n) ); \ - (b)[(i) + 1] = (unsigned char) ( (n) >> 8 ); \ - (b)[(i) + 2] = (unsigned char) ( (n) >> 16 ); \ - (b)[(i) + 3] = (unsigned char) ( (n) >> 24 ); \ +#define PUT_UINT32(n,b,i) \ +{ \ + (b)[(i) ] = (uint8) ( (n) ); \ + (b)[(i) + 1] = (uint8) ( (n) >> 8 ); \ + (b)[(i) + 2] = (uint8) ( (n) >> 16 ); \ + (b)[(i) + 3] = (uint8) ( (n) >> 24 ); \ } -#endif -/* - * MD5 context setup - */ void md5_starts( md5_context *ctx ) { ctx->total[0] = 0; @@ -69,26 +49,26 @@ void md5_starts( md5_context *ctx ) ctx->state[3] = 0x10325476; } -static void md5_process( md5_context *ctx, const unsigned char data[64] ) +void md5_process( md5_context *ctx, uint8 data[64] ) { - unsigned long X[16], A, B, C, D; - - GET_UINT32_LE( X[ 0], data, 0 ); - GET_UINT32_LE( X[ 1], data, 4 ); - GET_UINT32_LE( X[ 2], data, 8 ); - GET_UINT32_LE( X[ 3], data, 12 ); - GET_UINT32_LE( X[ 4], data, 16 ); - GET_UINT32_LE( X[ 5], data, 20 ); - GET_UINT32_LE( X[ 6], data, 24 ); - GET_UINT32_LE( X[ 7], data, 28 ); - GET_UINT32_LE( X[ 8], data, 32 ); - GET_UINT32_LE( X[ 9], data, 36 ); - GET_UINT32_LE( X[10], data, 40 ); - GET_UINT32_LE( X[11], data, 44 ); - GET_UINT32_LE( X[12], data, 48 ); - GET_UINT32_LE( X[13], data, 52 ); - GET_UINT32_LE( X[14], data, 56 ); - GET_UINT32_LE( X[15], data, 60 ); + uint32 X[16], A, B, C, D; + + GET_UINT32( X[0], data, 0 ); + GET_UINT32( X[1], data, 4 ); + GET_UINT32( X[2], data, 8 ); + GET_UINT32( X[3], data, 12 ); + GET_UINT32( X[4], data, 16 ); + GET_UINT32( X[5], data, 20 ); + GET_UINT32( X[6], data, 24 ); + GET_UINT32( X[7], data, 28 ); + GET_UINT32( X[8], data, 32 ); + GET_UINT32( X[9], data, 36 ); + GET_UINT32( X[10], data, 40 ); + GET_UINT32( X[11], data, 44 ); + GET_UINT32( X[12], data, 48 ); + GET_UINT32( X[13], data, 52 ); + GET_UINT32( X[14], data, 56 ); + GET_UINT32( X[15], data, 60 ); #define S(x,n) ((x << n) | ((x & 0xFFFFFFFF) >> (32 - n))) @@ -192,52 +172,46 @@ static void md5_process( md5_context *ctx, const unsigned char data[64] ) ctx->state[3] += D; } -/* - * MD5 process buffer - */ -void md5_update( md5_context *ctx, const void* vin, int ilen ) +void md5_update( md5_context *ctx, uint8 *input, uint32 length ) { - int fill; - unsigned long left; - const unsigned char* input = vin; + uint32 left, fill; - if( ilen <= 0 ) - return; + if( ! length ) return; left = ctx->total[0] & 0x3F; fill = 64 - left; - ctx->total[0] += ilen; + ctx->total[0] += length; ctx->total[0] &= 0xFFFFFFFF; - if( ctx->total[0] < (unsigned long) ilen ) + if( ctx->total[0] < length ) ctx->total[1]++; - if( left && ilen >= fill ) + if( left && length >= fill ) { memcpy( (void *) (ctx->buffer + left), (void *) input, fill ); md5_process( ctx, ctx->buffer ); - input += fill; - ilen -= fill; + length -= fill; + input += fill; left = 0; } - while( ilen >= 64 ) + while( length >= 64 ) { md5_process( ctx, input ); - input += 64; - ilen -= 64; + length -= 64; + input += 64; } - if( ilen > 0 ) + if( length ) { memcpy( (void *) (ctx->buffer + left), - (void *) input, ilen ); + (void *) input, length ); } } -static const unsigned char md5_padding[64] = +static uint8 md5_padding[64] = { 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -245,246 +219,75 @@ static const unsigned char md5_padding[64] = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; -/* - * MD5 final digest - */ -void md5_finish( md5_context *ctx, unsigned char *output ) +void md5_finish( md5_context *ctx, uint8 digest[16] ) { - unsigned long last, padn; - unsigned long high, low; - unsigned char msglen[8]; + uint32 last, padn; + uint32 high, low; + uint8 msglen[8]; high = ( ctx->total[0] >> 29 ) | ( ctx->total[1] << 3 ); low = ( ctx->total[0] << 3 ); - PUT_UINT32_LE( low, msglen, 0 ); - PUT_UINT32_LE( high, msglen, 4 ); + PUT_UINT32( low, msglen, 0 ); + PUT_UINT32( high, msglen, 4 ); last = ctx->total[0] & 0x3F; padn = ( last < 56 ) ? ( 56 - last ) : ( 120 - last ); - md5_update( ctx, (unsigned char *) md5_padding, padn ); + md5_update( ctx, md5_padding, padn ); md5_update( ctx, msglen, 8 ); - PUT_UINT32_LE( ctx->state[0], output, 0 ); - PUT_UINT32_LE( ctx->state[1], output, 4 ); - PUT_UINT32_LE( ctx->state[2], output, 8 ); - PUT_UINT32_LE( ctx->state[3], output, 12 ); -} - -/* - * Output = MD5( input buffer ) - */ -void md5( const void* vin, int ilen, - unsigned char *output ) -{ - md5_context ctx; - const unsigned char *input = vin; - - md5_starts( &ctx ); - md5_update( &ctx, input, ilen ); - md5_finish( &ctx, output ); - - memset( &ctx, 0, sizeof( md5_context ) ); -} - -static void write_hex(const unsigned char* md5, char* hexstr) { - sprintf(hexstr, "%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x", - md5[0], md5[1], md5[2], md5[3], md5[4], md5[5], md5[6], md5[7], - md5[8], md5[9], md5[10], md5[11], md5[12], md5[13], md5[14], md5[15]); -} - -void md5_finish_hex( md5_context *ctx, - char *hexstr ) { - unsigned char out[16]; - md5_finish(ctx, out); - write_hex(out, hexstr); -} - -void md5_hex( const void *input, int ilen, - char *hexstr ) { - unsigned char out[16]; - md5(input, ilen, out); - write_hex(out, hexstr); -} - -/* - * Output = MD5( file contents ) - */ -int md5_file( const char *path, unsigned char *output ) -{ - FILE *f; - size_t n; - md5_context ctx; - unsigned char buf[1024]; - - if( ( f = fopen( path, "rb" ) ) == NULL ) - return( 1 ); - - md5_starts( &ctx ); - - while( ( n = fread( buf, 1, sizeof( buf ), f ) ) > 0 ) - md5_update( &ctx, buf, (int) n ); - - md5_finish( &ctx, output ); - - memset( &ctx, 0, sizeof( md5_context ) ); - - if( ferror( f ) != 0 ) - { - fclose( f ); - return( 2 ); - } - - fclose( f ); - return( 0 ); -} - -int md5_file_hex( const char *path, char *output ) { - unsigned char out[16]; - int rtn; - rtn = md5_file(path, out); - if (rtn) - return rtn; - write_hex(out, output); - return rtn; -} - -/* - * MD5 HMAC context setup - */ -void md5_hmac_starts( md5_context *ctx, - const unsigned char *key, int keylen ) -{ - int i; - - memset( ctx->ipad, 0x36, 64 ); - memset( ctx->opad, 0x5C, 64 ); - - for( i = 0; i < keylen; i++ ) - { - if( i >= 64 ) break; - - ctx->ipad[i] ^= key[i]; - ctx->opad[i] ^= key[i]; - } - - md5_starts( ctx ); - md5_update( ctx, ctx->ipad, 64 ); + PUT_UINT32( ctx->state[0], digest, 0 ); + PUT_UINT32( ctx->state[1], digest, 4 ); + PUT_UINT32( ctx->state[2], digest, 8 ); + PUT_UINT32( ctx->state[3], digest, 12 ); } -/* - * MD5 HMAC process buffer - */ -void md5_hmac_update( md5_context *ctx, - const void *input, int ilen ) -{ - md5_update( ctx, input, ilen ); -} +#include +#include -/* - * MD5 HMAC final digest - */ -void md5_hmac_finish( md5_context *ctx, unsigned char *output ) +/* Use Linear congruential PRNG */ +int my_rand_r(int *seedp) { - unsigned char tmpbuf[16]; - - md5_finish( ctx, tmpbuf ); - md5_starts( ctx ); - md5_update( ctx, ctx->opad, 64 ); - md5_update( ctx, tmpbuf, 16 ); - md5_finish( ctx, output ); - - memset( tmpbuf, 0, sizeof( tmpbuf ) ); + /* Knuth & Lewis */ + unsigned x = *seedp * 1664525 + 1013904223; + *seedp = x; + return (x >> 16) & 0x7fff; } -/* - * Output = HMAC-MD5( hmac key, input buffer ) - */ -void md5_hmac( const unsigned char *key, int keylen, - const void *input, int ilen, - unsigned char *output ) +int main( int argc, char *argv[] ) { + FILE *f; + int i, j; + int repeat; + char output[33]; md5_context ctx; - - md5_hmac_starts( &ctx, key, keylen ); - md5_hmac_update( &ctx, input, ilen ); - md5_hmac_finish( &ctx, output ); - - memset( &ctx, 0, sizeof( md5_context ) ); -} - -#if defined(SELF_TEST) -/* - * RFC 1321 test vectors - */ -static const char md5_test_str[7][81] = -{ - { "" }, - { "a" }, - { "abc" }, - { "message digest" }, - { "abcdefghijklmnopqrstuvwxyz" }, - { "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789" }, - { "12345678901234567890123456789012345678901234567890123456789012" \ - "345678901234567890" } -}; - -static const unsigned char md5_test_sum[7][16] = -{ - { 0xD4, 0x1D, 0x8C, 0xD9, 0x8F, 0x00, 0xB2, 0x04, - 0xE9, 0x80, 0x09, 0x98, 0xEC, 0xF8, 0x42, 0x7E }, - { 0x0C, 0xC1, 0x75, 0xB9, 0xC0, 0xF1, 0xB6, 0xA8, - 0x31, 0xC3, 0x99, 0xE2, 0x69, 0x77, 0x26, 0x61 }, - { 0x90, 0x01, 0x50, 0x98, 0x3C, 0xD2, 0x4F, 0xB0, - 0xD6, 0x96, 0x3F, 0x7D, 0x28, 0xE1, 0x7F, 0x72 }, - { 0xF9, 0x6B, 0x69, 0x7D, 0x7C, 0xB7, 0x93, 0x8D, - 0x52, 0x5A, 0x2F, 0x31, 0xAA, 0xF1, 0x61, 0xD0 }, - { 0xC3, 0xFC, 0xD3, 0xD7, 0x61, 0x92, 0xE4, 0x00, - 0x7D, 0xFB, 0x49, 0x6C, 0xCA, 0x67, 0xE1, 0x3B }, - { 0xD1, 0x74, 0xAB, 0x98, 0xD2, 0x77, 0xD9, 0xF5, - 0xA5, 0x61, 0x1C, 0x2C, 0x9F, 0x41, 0x9D, 0x9F }, - { 0x57, 0xED, 0xF4, 0xA2, 0x2B, 0xE3, 0xC9, 0x55, - 0xAC, 0x49, 0xDA, 0x2E, 0x21, 0x07, 0xB6, 0x7A } -}; - -/* - * Checkup routine - */ -int md5_self_test( int verbose ) -{ - int i; + unsigned char buf[100000]; unsigned char md5sum[16]; - for( i = 0; i < 7; i++ ) - { - if( verbose != 0 ) - printf( " MD5 test #%d: ", i + 1 ); - - md5( (unsigned char *) md5_test_str[i], - strlen( md5_test_str[i] ), md5sum ); - - if( memcmp( md5sum, md5_test_sum[i], 16 ) != 0 ) + // Fill buffer with random, but deterministic data. + int random_seed = 1; + for (i = 0; i < sizeof(buf); ++i) + buf[i] = my_rand_r(&random_seed); + + repeat = 1; + if (argc == 2) repeat = atoi(argv[1]); + + for (; repeat; --repeat) { + md5_starts( &ctx ); + for (i = 0; i < 512; ++i) + md5_update( &ctx, buf+repeat, sizeof( buf )-repeat ); + md5_finish( &ctx, md5sum ); + + for( j = 0; j < 16; j++ ) { - if( verbose != 0 ) - printf( "failed\n" ); - - return( 1 ); + printf( "%02x", md5sum[j] ); } - if( verbose != 0 ) - printf( "passed\n" ); - } - - if( verbose != 0 ) printf( "\n" ); + } return( 0 ); } -#else -int md5_self_test( int verbose ) -{ - return( 0 ); -} -#endif + diff --git a/util/md5.h b/util/md5.h index 921d0eecf..f2722e323 100644 --- a/util/md5.h +++ b/util/md5.h @@ -1,162 +1,24 @@ -/* - * RFC 1321 compliant MD5 implementation - * - * Copyright (C) 2006-2007 Christophe Devine - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License, version 2.1 as published by the Free Software Foundation. - * - * This library 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 this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, - * MA 02110-1301 USA - */ -/* - * The MD5 algorithm was designed by Ron Rivest in 1991. - * - * http://www.ietf.org/rfc/rfc1321.txt - */ -/** - * \file md5.h - */ #ifndef _MD5_H #define _MD5_H -#ifdef __cplusplus -extern "C" { +#ifndef uint8 +#define uint8 unsigned char +#endif + +#ifndef uint32 +#define uint32 unsigned long int #endif -/** - * \brief MD5 context structure - */ typedef struct { - unsigned long total[2]; /*!< number of bytes processed */ - unsigned long state[4]; /*!< intermediate digest state */ - unsigned char buffer[64]; /*!< data block being processed */ - unsigned char ipad[64]; /*!< HMAC: inner padding */ - unsigned char opad[64]; /*!< HMAC: outer padding */ + uint32 total[2]; + uint32 state[4]; + uint8 buffer[64]; } md5_context; -/** - * \brief Write hex string representation of MD5(input) into hexstr. - * The output string must have size >= 33. - */ -void md5_hex( const void *input, int ilen, char *hexstr ); - -/** - * \brief MD5 context setup - * - * \param ctx context to be initialized - */ void md5_starts( md5_context *ctx ); - -/** - * \brief MD5 process buffer - * - * \param ctx MD5 context - * \param input buffer holding the data - * \param ilen length of the input data - */ -void md5_update( md5_context *ctx, const void *input, int ilen ); - -/** - * \brief MD5 final digest - * - * \param ctx MD5 context - * \param output MD5 checksum result - */ -void md5_finish( md5_context *ctx, unsigned char *output ); - -/** - * \brief Write hex string representation of MD5 into hexstr. - * The output string must have size >= 33. - */ -void md5_finish_hex( md5_context *ctx, char *hexstr ); - -/** - * \brief Output = MD5( input buffer ) - * - * \param input buffer holding the data - * \param ilen length of the input data - * \param output MD5 checksum result - */ -void md5( const void *input, int ilen, - unsigned char *output ); - -/** - * \brief Output = MD5( file contents ) - * - * \param path input file name - * \param output MD5 checksum result - * - * \return 0 if successful, 1 if fopen failed, - * or 2 if fread failed - */ -int md5_file( const char *path, unsigned char *output ); - -/** - Same as above, but hex output. "output" must have length >= 33. - */ -int md5_file_hex( const char *path, char *output ); - -/** - * \brief MD5 HMAC context setup - * - * \param ctx HMAC context to be initialized - * \param key HMAC secret key - * \param keylen length of the HMAC key - */ -void md5_hmac_starts( md5_context *ctx, - const unsigned char *key, int keylen ); - -/** - * \brief MD5 HMAC process buffer - * - * \param ctx HMAC context - * \param input buffer holding the data - * \param ilen length of the input data - */ -void md5_hmac_update( md5_context *ctx, - const void *input, int ilen ); - -/** - * \brief MD5 HMAC final digest - * - * \param ctx HMAC context - * \param output MD5 HMAC checksum result - */ -void md5_hmac_finish( md5_context *ctx, unsigned char *output ); - -/** - * \brief Output = HMAC-MD5( hmac key, input buffer ) - * - * \param key HMAC secret key - * \param keylen length of the HMAC key - * \param input buffer holding the data - * \param ilen length of the input data - * \param output HMAC-MD5 result - */ -void md5_hmac( const unsigned char *key, int keylen, - const void *input, int ilen, - unsigned char *output ); - -/** - * \brief Checkup routine - * - * \return 0 if successful, or 1 if the test failed - */ -int md5_self_test( int verbose ); - -#ifdef __cplusplus -} -#endif +void md5_update( md5_context *ctx, uint8 *input, uint32 length ); +void md5_finish( md5_context *ctx, uint8 digest[16] ); #endif /* md5.h */ diff --git a/util/merge-columns.py b/util/merge-columns.py index aac8ac3aa..9d0951dfd 100755 --- a/util/merge-columns.py +++ b/util/merge-columns.py @@ -1,4 +1,6 @@ #! /usr/bin/env python +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE from astrometry.util.fits import * import sys diff --git a/util/miscutils.py b/util/miscutils.py index 89f3e0553..893abaec1 100644 --- a/util/miscutils.py +++ b/util/miscutils.py @@ -1,3 +1,5 @@ +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE from math import pi import numpy as np diff --git a/util/multiindex.c b/util/multiindex.c index ff9525153..bd97f28e0 100644 --- a/util/multiindex.c +++ b/util/multiindex.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2010 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/util/multiproc.py b/util/multiproc.py index d3afb37d8..4ea437a6f 100644 --- a/util/multiproc.py +++ b/util/multiproc.py @@ -1,3 +1,5 @@ +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE from __future__ import print_function import multiprocessing diff --git a/util/os-features-test.c b/util/os-features-test.c index 164a7f666..001d49936 100644 --- a/util/os-features-test.c +++ b/util/os-features-test.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2008, 2012 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include #include diff --git a/util/os-features.c b/util/os-features.c index e3923c35d..5beb0fe76 100644 --- a/util/os-features.c +++ b/util/os-features.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2008, 2012 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include #include diff --git a/util/pad-file.c b/util/pad-file.c index aa8e50026..f9a8dde24 100644 --- a/util/pad-file.c +++ b/util/pad-file.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2009 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/util/permutedsort.c b/util/permutedsort.c index 1287553fa..e1efb6cf6 100644 --- a/util/permutedsort.c +++ b/util/permutedsort.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/util/plotSipDistortion.py b/util/plotSipDistortion.py index 6de7e2cbf..19c28eb2f 100755 --- a/util/plotSipDistortion.py +++ b/util/plotSipDistortion.py @@ -1,4 +1,6 @@ #! /usr/bin/env python +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE if __name__ == '__main__': import matplotlib matplotlib.use('Agg') diff --git a/util/plotshift.py b/util/plotshift.py index 771621c41..13896551c 100755 --- a/util/plotshift.py +++ b/util/plotshift.py @@ -1,4 +1,6 @@ #! /usr/bin/env python +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE import sys from optparse import OptionParser diff --git a/util/plotutils.py b/util/plotutils.py index 7c5fce269..c7cc79de8 100644 --- a/util/plotutils.py +++ b/util/plotutils.py @@ -1,3 +1,5 @@ +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE import matplotlib.cm import matplotlib.colors import matplotlib.patches diff --git a/util/pnmutils.py b/util/pnmutils.py index c6a49404e..7c4279452 100644 --- a/util/pnmutils.py +++ b/util/pnmutils.py @@ -1,3 +1,5 @@ +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE from numpy import * # Writes a numpy array as PGM to the given file handle. The numpy diff --git a/util/qidxfile.c b/util/qidxfile.c index 5bc387b48..bf6e8505d 100644 --- a/util/qidxfile.c +++ b/util/qidxfile.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006-2008 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/util/quadfile.c b/util/quadfile.c index 896619b50..8c1e15506 100644 --- a/util/quadfile.c +++ b/util/quadfile.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/util/query-starkd.c b/util/query-starkd.c index 8963ffb34..596a76b3b 100644 --- a/util/query-starkd.c +++ b/util/query-starkd.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2009,2010 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/util/rdlist.c b/util/rdlist.c index e4fd7b25d..b07112908 100644 --- a/util/rdlist.c +++ b/util/rdlist.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/util/removelines.py b/util/removelines.py index 3d5210af6..b93e9428d 100755 --- a/util/removelines.py +++ b/util/removelines.py @@ -1,4 +1,6 @@ #! /usr/bin/env python +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE import os import sys import logging diff --git a/util/removelines_general.py b/util/removelines_general.py index 83bdc2fb6..25da6cd2b 100755 --- a/util/removelines_general.py +++ b/util/removelines_general.py @@ -1,4 +1,6 @@ #! /usr/bin/env python +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE import sys try: diff --git a/util/removelines_rotate.py b/util/removelines_rotate.py index 643714cd2..f97513103 100755 --- a/util/removelines_rotate.py +++ b/util/removelines_rotate.py @@ -1,4 +1,6 @@ #! /usr/bin/env python +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE import matplotlib matplotlib.use('Agg') import os diff --git a/util/resample-main.c b/util/resample-main.c index 879d459f0..abd93cc45 100644 --- a/util/resample-main.c +++ b/util/resample-main.c @@ -1,3 +1,7 @@ +/* +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE + */ #include #include #include diff --git a/util/resample.c b/util/resample.c index ae4318535..f0e7b234b 100644 --- a/util/resample.c +++ b/util/resample.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2011 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/util/resample.inc b/util/resample.inc index a93e8af87..5402915b7 100644 --- a/util/resample.inc +++ b/util/resample.inc @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2011, 2012 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ double MANGLE(lanczos_resample_unw_sep)(double px, double py, diff --git a/util/resample.py b/util/resample.py index 40737ac1e..a943d23e3 100644 --- a/util/resample.py +++ b/util/resample.py @@ -1,11 +1,6 @@ +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE import numpy as np -# moved down to where they are used: -#import scipy.interpolate as interp -#from miscutils import lanczos_filter - -# DEBUG -#from .plotutils import * -#import pylab as plt class ResampleError(Exception): pass diff --git a/util/run_command.py b/util/run_command.py index d40de5f20..b3b315503 100644 --- a/util/run_command.py +++ b/util/run_command.py @@ -1,3 +1,5 @@ +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE import subprocess import os import select diff --git a/util/scamp-catalog.c b/util/scamp-catalog.c index b706b2418..3ea8df1ae 100644 --- a/util/scamp-catalog.c +++ b/util/scamp-catalog.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2008 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/util/scamp.c b/util/scamp.c index ea637d631..15810141e 100644 --- a/util/scamp.c +++ b/util/scamp.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2008 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include "scamp.h" diff --git a/util/sdss_astrom.py b/util/sdss_astrom.py deleted file mode 100644 index 14ffb21ba..000000000 --- a/util/sdss_astrom.py +++ /dev/null @@ -1,249 +0,0 @@ -# Copyright 2010 Dustin Lang and David W. Hogg, all rights reserved. - -# Note: not thoroughly tested. - -# style notes: -# ------------ -# - column is x, row is y; this is at odds with some online documentation - -from astrometry.util.fits import * -from numpy import * -try: - import pyfits -except ImportError: - try: - from astropy.io import fits as pyfits - except ImportError: - raise ImportError("Cannot import either pyfits or astropy.io.fits") -from glob import glob - -def tsfield_get_node_incl(tsfield): - hdr = tsfield[0].header - node = deg2rad(hdr.get('NODE')) - incl = deg2rad(hdr.get('INCL')) - return (node, incl) - -def radec_to_pixel(ra, dec, color, band, tsfield): - mu, nu = radec_to_munu(ra, dec, tsfield) - return munu_to_pixel(mu, nu, color, band, tsfield) - -def pixel_to_radec(x, y, color, band, tsfield): - mu, nu = pixel_to_munu(x, y, color, band, tsfield) - return munu_to_radec(mu, nu, tsfield) - -def munu_to_radec(mu, nu, tsfield): - node, incl = tsfield_get_node_incl(tsfield) - mu, nu = deg2rad(mu), deg2rad(nu) - ra = node + arctan2(sin(mu - node) * cos(nu) * cos(incl) - sin(nu) * sin(incl), cos(mu - node) * cos(nu)) - dec = arcsin(sin(mu - node) * cos(nu) * sin(incl) + sin(nu) * cos(incl)) - ra, dec = rad2deg(ra), rad2deg(dec) - ra += (360. * (ra < 0)) - return (ra, dec) - -def radec_to_munu(ra, dec, tsfield): - node, incl = tsfield_get_node_incl(tsfield) - ra, dec = deg2rad(ra), deg2rad(dec) - mu = node + arctan2(sin(ra - node) * cos(dec) * cos(incl) + sin(dec) * sin(incl), cos(ra - node) * cos(dec)) - nu = arcsin(-sin(ra - node) * cos(dec) * sin(incl) + sin(dec) * cos(incl)) - mu, nu = rad2deg(mu), rad2deg(nu) - mu += (360. * (mu < 0)) - return (mu, nu) - -def prime_to_pixel(xprime, yprime, color, band, tsfield): - T = fits_table(tsfield[1].data) - T = T[0] - color0 = T.ricut[band] - g0, g1, g2, g3 = T.drow0[band], T.drow1[band], T.drow2[band], T.drow3[band] - h0, h1, h2, h3 = T.dcol0[band], T.dcol1[band], T.dcol2[band], T.dcol3[band] - px, py = T.csrow[band], T.cscol[band] - qx, qy = T.ccrow[band], T.cccol[band] - - # #$(%*&^(%$%*& bad documentation. - (px,py) = (py,px) - (qx,qy) = (qy,qx) - - color = atleast_1d(color) - color0 = atleast_1d(color0) - # HACK HACK HACK FIXME - qx = qx * ones_like(xprime) - qy = qy * ones_like(yprime) - print 'color', color.shape, 'px', px.shape, 'qx', qx.shape - xprime -= where(color < color0, px * color, qx) - yprime -= where(color < color0, py * color, qy) - - # Now invert: - # yprime = y + g0 + g1 * x + g2 * x**2 + g3 * x**3 - # xprime = x + h0 + h1 * x + h2 * x**2 + h3 * x**3 - x = xprime - h0 - # dumb-ass Newton's method - dx = 1. - while max(abs(atleast_1d(dx))) > 1e-10: - xp = x + h0 + h1 * x + h2 * x**2 + h3 * x**3 - dxpdx = 1 + h1 + h2 * 2*x + h3 * 3*x**2 - dx = (xprime - xp) / dxpdx - print 'Max Newton dx', max(abs(dx)) - x += dx - y = yprime - (g0 + g1 * x + g2 * x**2 + g3 * x**3) - return (x, y) - -def pixel_to_prime(x, y, color, band, tsfield): - T = fits_table(tsfield[1].data) - T = T[0] - - # Secret decoder ring: - # http://www.sdss.org/dr7/products/general/astrometry.html - # (color)0 is called riCut; - # g0, g1, g2, and g3 are called - # dRow0, dRow1, dRow2, and dRow3, respectively; - # h0, h1, h2, and h3 are called - # dCol0, dCol1, dCol2, and dCol3, respectively; - # px and py are called csRow and csCol, respectively; - # and qx and qy are called ccRow and ccCol, respectively. - color0 = T.ricut[band] - g0, g1, g2, g3 = T.drow0[band], T.drow1[band], T.drow2[band], T.drow3[band] - h0, h1, h2, h3 = T.dcol0[band], T.dcol1[band], T.dcol2[band], T.dcol3[band] - px, py = T.csrow[band], T.cscol[band] - qx, qy = T.ccrow[band], T.cccol[band] - # #$(%*&^(%$%*& bad documentation. - (px,py) = (py,px) - (qx,qy) = (qy,qx) - - yprime = y + g0 + g1 * x + g2 * x**2 + g3 * x**3 - xprime = x + h0 + h1 * x + h2 * x**2 + h3 * x**3 - - #if color < color0: - # xprime += px * color - # yprime += py * color - #else: - # xprime += qx - # yprime += qy - color = atleast_1d(color) - color0 = atleast_1d(color0) - qx = qx * ones_like(x) - qy = qy * ones_like(y) - print 'color', color.shape, 'px', px.shape, 'qx', qx.shape - xprime += where(color < color0, px * color, qx) - yprime += where(color < color0, py * color, qy) - return (xprime, yprime) - -def pixel_to_munu(x, y, color, band, tsfield): - T = fits_table(tsfield[1].data) - T = T[0] - (xprime, yprime) = pixel_to_prime(x, y, color, band, tsfield) - a, b, c = T.a[band], T.b[band], T.c[band] - d, e, f = T.d[band], T.e[band], T.f[band] - mu = a + b * yprime + c * xprime - nu = d + e * yprime + f * xprime - return (mu, nu) - -def munu_to_pixel(mu, nu, color, band, tsfield): - T = fits_table(tsfield[1].data) - T = T[0] - a, b, c = T.a[band], T.b[band], T.c[band] - d, e, f = T.d[band], T.e[band], T.f[band] - determinant = b * f - c * e - B = f / determinant - C = -c / determinant - E = -e / determinant - F = b / determinant - yprime = B * (mu - a) + C * (nu - d) - xprime = E * (mu - a) + F * (nu - d) - return prime_to_pixel(xprime, yprime, color, band, tsfield) - -if __name__ == '__main__': - tsfield = pyfits.open(glob('tsField-002830-6-*-0398.fit')[0]) - - x,y = 0,0 - band = array([2,3]) - color = 0. - rd = pixel_to_radec(x, y, color, band, tsfield) - print rd - - N = 10 - x = numpy.random.uniform(2048, size=(N,)) - y = numpy.random.uniform(1489, size=(N,)) - color = numpy.random.uniform(-1, 4, size=(N,)) - band = 2 - rd = pixel_to_radec(x, y, color, band, tsfield) - print rd - - m,n = numpy.random.uniform(360, size=N), numpy.random.uniform(-90, 90, size=N) - r,d = munu_to_radec(m, n, tsfield) - mu,nu = radec_to_munu(r, d, tsfield) - print mu-m, nu-n - - x,y = numpy.random.uniform(2048, size=N), numpy.random.uniform(1489, 90, size=N) - mu,nu = pixel_to_munu(x, y, color, band, tsfield) - xx,yy = munu_to_pixel(mu, nu, color, band, tsfield) - print 'diff:', xx-x, yy-y - - - x,y = numpy.random.uniform(2048, size=N), numpy.random.uniform(1489, 90, size=N) - ra,dec = pixel_to_radec(x, y, color, band, tsfield) - xx,yy = radec_to_pixel(ra, dec, color, band, tsfield) - rr,dd = pixel_to_radec(xx, yy, color, band, tsfield) - print 'diff in pix:', xx-x, yy-y - print 'diff in ra,dec:', rr-ra, dd-dec - - - from astrometry.util.sip import * - wcs = Sip('fpC-002830-r6-0398.fit') - - N = 800 - O = fits_table('tsObj-002830-6-0-0398.fit') - ra,dec = O.ra, O.dec - print 'ra,dec', ra.shape, dec.shape - band = 2 - ra = ra[:N] - dec = dec[:N] - X,Y = O.colc[:,band], O.rowc[:,band] - X = X[:N] - Y = Y[:N] - print 'x', X.shape - rmag = O.psfcounts[:,2] - imag = O.psfcounts[:,3] - color = (rmag - imag)[:N] - #color = zeros_like(X) - xx,yy = radec_to_pixel(ra, dec, color, band, tsfield) - print 'xx', xx.shape - rr,dd = pixel_to_radec(X, Y, color, band, tsfield) - print 'dxy', xx-X, yy-Y - print 'dradec', ra-rr, dec-dd - - - # with color: - # 14 mpix X, 14 mpix Y - - # color=0: - # 2 mpix X, 14 mpix Y - - print 'MAD:', median(abs(xx-X)), median(abs(yy-Y)) - - if False: - for Xi,Yi,xi,yi,ri,di in zip(X,Y,xx,yy,ra,dec): - wxi,wyi = wcs.radec2pixelxy(ri,di) - print (' X,Y (%8.2f,%8.2f) xx,yy (%8.2f, %8.2f), dx,dy (%8.2f, %8.2f), wcs xy (%8.2f, %8.2f) wcs dxy (%8.2f, %8.2f)' % - (Xi, Yi, xi, yi, (Xi-xi), (Yi-yi), wxi, wyi, Xi-wxi, Yi-wyi)) - - from pylab import * - - clf() - plot(X, Y, 'k.') - plot(xx, yy, 'rx') - plot(vstack((X,xx)), array((Y,yy)), '-', color='0.5') - savefig('dxy.png') - - #rd = array([wcs.pixelxy2radec(x,y) for x,y in zip(X,Y)]) - #r1 = rd[:,0] - #d1 = rd[:,1] - #print 'delta radec', r1 - - if False: - for band in range(5): - X,Y = O.colc[:,band], O.rowc[:,band] - color = zeros_like(X) - xx,yy = radec_to_pixel(ra, dec, color, band, tsfield) - print 'xx', xx.shape - rr,dd = pixel_to_radec(X, Y, color, band, tsfield) - print 'dxy', xx-X, yy-Y - print 'dradec', ra-rr, dec-dd diff --git a/util/sdss_cutout.py b/util/sdss_cutout.py deleted file mode 100644 index bb2c24198..000000000 --- a/util/sdss_cutout.py +++ /dev/null @@ -1,80 +0,0 @@ -#! /usr/bin/env python - -import os -import sys -try: - import pyfits -except ImportError: - try: - from astropy.io import fits as pyfits - except ImportError: - raise ImportError("Cannot import either pyfits or astropy.io.fits") -from astrometry.util.util import * -from astrometry.util.sdss_noise import * -from astrometry.util.sdss_psfield import * - - -def main(): - from optparse import OptionParser - parser = OptionParser(usage='%prog [options] [ ]') - parser.add_option('-s', '--size', dest='size', type=int, default=300, - help='Size of cutout in pixels') - parser.add_option('-b', '--band', dest='band', default='r', - help='Band (u,g,r,i,z)') - (opt, args) = parser.parse_args() - if len(args) not in [4,7]: - parser.print_help() - print 'Got arguments:', args - sys.exit(-1) - # parse RA,Dec. - ra = float(args[0]) - dec = float(args[1]) - fpC = args[2] - cutout = args[3] - - if not os.path.exists(fpC): - print 'Input fpC', fpC, 'does not exist' - sys.exit(-1) - - if len(args) == 7: - cutout(fpC, ra, dec, opt.size, cutout) - else: - cutout(fpC, ra, dec, opt.size, cutout, args[4], args[5], args[6], opt.band) - - -def cutout(fpC, ra, dec, size, cutout, fpMfn=None, psFieldfn=None, invvarfn=None, band=None): - - wcs = Tan(fpC, 0) - x,y = wcs.radec2pixelxy(ra, dec) - x,y = int(x),int(y) - print 'x,y', x,y - dl = size / 2 - dh = size - dl - # ?? - xlo,xhi = max(0, x-dl), min(2048-1, x+dh-1) - ylo,yhi = max(0, y-dl), min(1489-1, y+dh-1) - os.system('imcopy %s"[%i:%i,%i:%i]" !%s' % - (fpC, xlo, xhi, ylo, yhi, cutout)) - - if invvarfn is None: - return - - bandnum = 'ugriz'.index(band) - - fpc = pyfits.open(fpC)[0].data.astype(float) - fpM = pyfits.open(fpMfn) - (gain, darkvar, sky, skyerr) = sdss_psfield_noise(psFieldfn, band=bandnum) - - invvar = sdss_noise_invvar(fpc, fpM, xlo, xhi, ylo, yhi, - gain, darkvar, sky, skyerr) - print invvar.shape - #print 'x', xlo, xhi - #print 'y', ylo, yhi - #invvar = invvar[ylo:yhi, xlo:xhi] - #print invvar.shape - pyfits.writeto(invvarfn, invvar, clobber=True) - - -if __name__ == '__main__': - main() - diff --git a/util/sdss_filenames.py b/util/sdss_filenames.py deleted file mode 100644 index ee5b7bedb..000000000 --- a/util/sdss_filenames.py +++ /dev/null @@ -1,60 +0,0 @@ -import os.path - -def sdss_band_name(b): - if b in ['u','g','r','i','z']: - return b - if b in [0,1,2,3,4]: - return 'ugriz'[b] - raise Exception('Invalid SDSS band: "' + str(b) + '"') - -def sdss_band_index(b): - if b in ['u','g','r','i','z']: - return 'ugriz'.index(b) - if b in [0,1,2,3,4]: - return b - raise Exception('Invalid SDSS band: "' + str(b) + '"') - -def sdss_filename(filetype, run, camcol, field, band=None, rerun=0): - if band is not None: - band = sdss_band_name(band) - x = dict(run=run, band=band, camcol=camcol, field=field, rerun=rerun) - ftmap = { - 'fpC': 'fpC-%(run)06i-%(band)s%(camcol)i-%(field)04i.fit', - 'fpAtlas': 'fpAtlas-%(run)06i-%(camcol)i-%(field)04i.fit', - 'fpM': 'fpM-%(run)06i-%(band)s%(camcol)i-%(field)04i.fit', - 'fpObjc': 'fpObjc-%(run)06i-%(camcol)i-%(field)04i.fit', - 'psField': 'psField-%(run)06i-%(camcol)i-%(field)04i.fit', - 'tsObj': 'tsObj-%(run)06i-%(camcol)i-%(rerun)i-%(field)04i.fit', - 'tsField': 'tsField-%(run)06i-%(camcol)i-%(rerun)i-%(field)04i.fit', - - #'http://das.sdss.org/imaging/125/40/astrom/asTrans-000125.fit' - # http://das.sdss.org/imaging/125/40/calibChunks/3/tsField-000125-3-40-0196.fit - } - format = ftmap.get(filetype, None) - if format is None: - return None - #print 'format', format, 'x', x - return format % x - -def sdss_path(filetype, run, camcol, field, band=None, rerun=None): - x = dict(run=run, band=band, camcol=camcol, field=field, rerun=rerun) - y = (run, camcol, field, band, rerun) - if filetype in ['fpC']: - return '%(run)i/%(rerun)i/corr/%(camcol)i/' % x + sdss_filename(filetype, *y) - elif filetype in ['psField', 'fpAtlas', 'fpObjc', 'fpM']: - return '%(run)i/%(rerun)i/objcs/%(camcol)i/' % x + sdss_filename(filetype, *y) - elif filetype in ['tsObj', 'tsField']: - return '%(run)i/%(rerun)i/calibChunks/%(camcol)i/' % x + sdss_filename(filetype, *y) - else: - return None - -def sdss_find_file(filetype, run, camcol, field, band=None, reruns=None, datadir=None, reduxdir=None): - if filetype == 'psField': - basedir = datadir - for rerun in reruns: - pth = os.path.join(basedir, sdss_path(filetype, run, camcol, field, band=band, rerun=rerun)) - print 'trying path', pth - if os.path.exists(pth): - return pth - return None - diff --git a/util/sdss_flags.py b/util/sdss_flags.py deleted file mode 100644 index 00ad3dae8..000000000 --- a/util/sdss_flags.py +++ /dev/null @@ -1,82 +0,0 @@ -flag1dict = dict( - CANONICAL_CENTER = 1, - BRIGHT = 2, - EDGE = 4, - BLENDED = 8, - CHILD = 16, - PEAKCENTER = 32, - NODEBLEND = 64, - NOPROFILE = 128, - NOPETRO = 256, - MANYPETRO = 512, - NOPETRO_BIG = 1024, - DEBLEND_TOO_MANY_PEAKS = 2048, - CR = 4096, - MANYR50 = 8192, - MANYR90 = 16384, - BAD_RADIAL = 32768, - INCOMPLETE_PROFILE = 65536, - INTERP = 131072, - SATUR = 262144, - NOTCHECKED = 524288, - SUBTRACTED = 1048576, - NOSTOKES = 2097152, - BADSKY = 4194304, - PETROFAINT = 8388608, - TOO_LARGE = 16777216, - DEBLENDED_AS_PSF = 33554432, - DEBLEND_PRUNED = 67108864, - ELLIPFAINT = 134217728, - BINNED1 = 268435456, - BINNED2 = 536870912, - BINNED4 = 1073741824, - MOVED = 2147483648L, - ) - -flag2dict = dict( - DEBLENDED_AS_MOVING = 1, - NODEBLEND_MOVING = 2, - TOO_FEW_DETECTIONS = 4, - BAD_MOVING_FIT = 8, - STATIONARY = 16, - PEAKS_TOO_CLOSE = 32, - BINNED_CENTER = 64, - LOCAL_EDGE = 128, - BAD_COUNTS_ERROR = 256, - BAD_MOVING_FIT_CHILD = 512, - DEBLEND_UNASSIGNED_FLUX = 1024, - SATUR_CENTER = 2048, - INTERP_CENTER = 4096, - DEBLENDED_AT_EDGE = 8192, - DEBLEND_NOPEAK = 16384, - PSF_FLUX_INTERP = 32768, - TOO_FEW_GOOD_DETECTIONS = 65536, - CENTER_OFF_AIMAGE = 131072, - DEBLEND_DEGENERATE = 262144, - BRIGHTEST_GALAXY_CHILD = 524288, - CANONICAL_BAND = 1048576, - AMOMENT_UNWEIGHTED = 2097152, - AMOMENT_SHIFT = 4194304, - AMOMENT_MAXITER = 8388608, - MAYBE_CR = 16777216, - MAYBE_EGHOST = 33554432, - NOTCHECKED_CENTER = 67108864, - HAS_SATUR_DN = 134217728, - SPARE4 = 268435456, - SPARE3 = 536870912, - SPARE2 = 1073741824, - SPARE1 = 2147483648L, -) - -def fpobjc_decode_flag1(name): - return flag1dict[name] - -def fpobjc_decode_flag2(name): - return flag2dict[name] - -def fpobjc_flag1_to_name(flags, sep=', '): - names = [] - for k,v in flag1dict.items(): - if flags & v: - names.append(k) - return sep.join(names) diff --git a/util/sdss_get_catalog.py b/util/sdss_get_catalog.py deleted file mode 100755 index 53c8e8a8c..000000000 --- a/util/sdss_get_catalog.py +++ /dev/null @@ -1,101 +0,0 @@ -#! /usr/bin/env python -import os -import sys -import time -from optparse import * -from math import * - -from astrometry.util import casjobs -from astrometry.util.starutil_numpy import * - -# override numpy.random -import random - -def sdss_cas_get(username, password, ra, dec, radius, fn, band=None, maxmag=None, delete=True, mydbname=None, dr=None): - - casjobs.setup_cookies() - - if dr is None: - dr = 'dr7' - cas = casjobs.get_known_servers()[dr] - cas.login(username, password) - - if mydbname is None: - az = [chr(i) for i in range(ord('A'), ord('Z')+1)] - sam = random.sample(az, 10) - mydbname = 'cat_' + ''.join(sam)# random.sample(az, 10)) - - if band is not None and maxmag is not None: - magcut = 'and %s <= %g' % (band, maxmag) - else: - magcut = '' - - # It's MUCH faster to pre-compute the bounding RA,Dec box in addition - # to the fDistanceArcMinEq call. - ramin = max(0, ra - radius / cos(deg2rad(dec))) - ramax = min(360, ra + radius / cos(deg2rad(dec))) - decmin = dec - radius - decmax = dec + radius - - sql = ' '.join(['select ra,dec,raErr,decErr,flags,u,g,r,i,z,' - 'err_u,err_g,err_r,err_i,err_z', - ('into mydb.%s' % mydbname), - 'from PhotoPrimary', - ('where ra >= %g and ra <= %g and dec >= %g and dec <= %g' % - (ramin, ramax, decmin, decmax)), - ('and dbo.fDistanceArcMinEq(%g, %g, ra, dec) <= %g' % - (ra, dec, deg2arcmin(radius))), - magcut - ]) - print 'Submitting SQL:' - print sql - - jobid = cas.submit_query(sql) - print 'jobid', jobid - - while True: - jobstatus = cas.get_job_status(jobid) - print 'Job id', jobid, 'is', jobstatus - if jobstatus in ['Finished', 'Failed', 'Cancelled']: - break - print 'Waiting...' - time.sleep(10) - - print 'Requesting output...' - cas.output_and_download(mydbname, fn, dodelete=delete) - - -if __name__ == '__main__': - parser = OptionParser(usage='%prog [options] ') - - parser.add_option('-r', dest='radius', type='float', help='Search radius, in deg (default 1 deg)') - parser.add_option('-b', dest='band', help='Band to use for mag and flag cuts (default: r, options: u,g,r,i,z') - parser.add_option('-m', dest='maxmag', type='float', help='Maximum magnitude cut') - parser.add_option('-u', dest='username', help='SDSS CasJobs username (default: from $SDSS_CAS_USER)') - parser.add_option('-p', dest='password', help='SDSS CasJobs password (default: from $SDSS_CAS_PASS)') - parser.add_option('-R', dest='dr', type='string', help='CAS server to use ("dr7" or "dr8")') - parser.set_defaults(radius=1.0, band='r', maxmag=20., username=None, password=None, dr=None) - - (opt, args) = parser.parse_args() - if len(args) != 3: - parser.print_help() - print - print 'Got extra arguments:', args - sys.exit(-1) - - if opt.username is None: - opt.username = os.environ['SDSS_CAS_USER'] - if opt.password is None: - opt.password = os.environ['SDSS_CAS_PASS'] - if opt.username is None or opt.password is None: - print 'Need CAS username and password.' - sys.exit(-1) - - # parse RA,Dec. - ra = float(args[0]) - dec = float(args[1]) - outfn = args[2] - - sdss_cas_get(opt.username, opt.password, ra, dec, opt.radius, outfn, - opt.band, opt.maxmag, dr=opt.dr) - diff --git a/util/sdss_noise.py b/util/sdss_noise.py deleted file mode 100644 index 9d799614f..000000000 --- a/util/sdss_noise.py +++ /dev/null @@ -1,41 +0,0 @@ -from astrometry.util.miscutils import * -from astrometry.util.fits import * - -# Produces a (cut-out of) the inverse-variance noise image, from columns -# [x0,x1] and rows [y0,y1] (inclusive). Default is the whole image. -# "fpC" is a numpy array of the image (eg, pyfits.open(fpcfn)[0].data ) -# "mask" is a pyfits object (eg, pyfits.open(fpmaskfn) ) -# gain, darkvar, sky, and skyerr can be retrieved from the psField file. -def sdss_noise_invvar(fpC, mask, x0=0, x1=None, y0=0, y1=None, - gain=1., darkvar=0., sky=0., skyerr=0.): - if x1 is None: - x1 = fpC.shape[1]-1 - if y1 is None: - y1 = fpC.shape[0]-1 - - # Poisson: mean = variance - # Add readout noise? - # Spatial smoothing? - #ivarimg = 1./fpC[y0:y1+1, x0:x1+1] - - img = fpC[y0:y1+1, x0:x1+1] - - # from http://www.sdss.org/dr7/algorithms/fluxcal.html - ivarimg = 1./((img + sky) / gain + darkvar + skyerr) - - # Noise model: - # -mask coordinates are wrt fpC coordinates. - # -INTERP, SATUR, CR, - # -GHOST? - # HACK -- MAGIC -- these are the indices of INTER, SATUR, CR, and GHOST - for i in [0, 1, 8, 9]: - M = table_fields(mask[i+1].data) - if M is None: - continue - for (c0,c1,r0,r1) in zip(M.cmin,M.cmax,M.rmin,M.rmax): - (outx,nil) = get_overlapping_region(c0-x0, c1+1-x0, 0, x1-x0) - (outy,nil) = get_overlapping_region(r0-y0, r1+1-y0, 0, y1-y0) - ivarimg[outy,outx] = 0 - return ivarimg - - diff --git a/util/sdss_photom.py b/util/sdss_photom.py deleted file mode 100644 index 3d31ace76..000000000 --- a/util/sdss_photom.py +++ /dev/null @@ -1,124 +0,0 @@ -# Copyright 2010 Dustin Lang and David W. Hogg, all rights reserved. - -# Note: not thoroughly tested. - -# http://www.sdss.org/dr7/algorithms/fluxcal.html - - -from astrometry.util.fits import * -from numpy import * -import numpy as np -try: - import pyfits -except ImportError: - try: - from astropy.io import fits as pyfits - except ImportError: - raise ImportError("Cannot import either pyfits or astropy.io.fits") - -class PhotometricCalib(object): - def __init__(self, tsfieldfn): - # definition of exptime, according to web page above. - tsfield = fits_table(tsfieldfn)[0] - self.exptime = 53.907456 - self.aa = tsfield.aa.astype(float) - self.kk = tsfield.kk.astype(float) - self.airmass = tsfield.airmass - - -def sdss_maggies_to_mag(flux): - return -2.5 * np.log10(flux) - -def sdss_counts_to_maggies(counts, band, calib): - return counts/calib.exptime * 10.**(0.4*(calib.aa[band] + calib.kk[band] * calib.airmass[band])) - -def sdss_counts_to_mag(counts, band, calib): - return sdss_maggies_to_mag(sdss_counts_to_maggies(counts, band, calib)) - -def sdss_mag_to_counts(mag, band, calib): - logcounts = -0.4 * mag + np.log10(calib.exptime) - 0.4*(calib.aa[band] + calib.kk[band] * calib.airmass[band]) - return 10.**logcounts - -if __name__ == '__main__': - from glob import glob - fn = glob('tsField-002830-6-*-0398.fit')[0] - calib = PhotometricCalib(fn) - - tsobj = fits_table(glob('tsObj-002830-6-*-0398.fit')[0]) - fpobj = fits_table('fpObjc-002830-6-0398.fit') - - for band in range(5): - counts = fpobj.psfcounts[:,band] - I = counts > 10.**(3.5) - counts = counts[I].astype(float) - print 'Counts', counts - mag = sdss_counts_to_mag(counts, band, calib) - print 'Mag', mag - mag2 = tsobj.psfcounts[:, band].astype(float) - print 'Mag2', mag2 - counts2 = sdss_mag_to_counts(mag, band, calib) - print 'Counts2', counts2 - for c1,c2 in zip(counts, counts2): - print c1,c2 - sys.exit(0) - - from pylab import * - - for band in range(5): - counts = fpobj.psfcounts[:,band] - I = counts > 10.**(3.5) - counts = counts[I].astype(float) - mag = sdss_counts_to_mag(counts, band, calib) - print mag - mag2 = tsobj.psfcounts[:, band].astype(float) - - clf() - dig = (mag2 * 1e4).astype(int) % 10 - hist(dig, bins=range(10)) - savefig('dig1-%i.png' % band) - - clf() - J = mag2 > -9999 - plot(mag2[J], dig[J], 'r.') - savefig('dig3-%i.png' % band) - - mag2 = mag2[I] - clf() - dig = (mag2 * 1e4).astype(int) % 10 - hist(dig, bins=range(10)) - savefig('dig2-%i.png' % band) - - print mag2 - - - - clf() - axhline(0, linestyle='-', color='k') - (dmlo,dmhi) = (-1e-3, 1e-3) - semilogx(counts, clip(mag2-mag, dmlo, dmhi), 'r.') - xlabel('counts') - ylabel('dmag') - ylim(dmlo, dmhi) - xlim(min(counts), max(counts)) - savefig('dmag-%i.png' % band) - - clf() - - subplot(2,1,1) - axhline(0, linestyle='-', color='k') - (dmlo,dmhi) = (-1e-3, 1e-3) - plot(fpobj.rowc[I,band], clip(mag2-mag, dmlo, dmhi), 'r.') - xlabel('rowc') - ylabel('dmag') - ylim(dmlo, dmhi) - - subplot(2,1,2) - axhline(0, linestyle='-', color='k') - (dmlo,dmhi) = (-1e-3, 1e-3) - plot(fpobj.colc[I,band], clip(mag2-mag, dmlo, dmhi), 'r.') - xlabel('colc') - ylabel('dmag') - ylim(dmlo, dmhi) - - savefig('dmagxy-%i.png' % band) - diff --git a/util/sdss_psf.py b/util/sdss_psf.py deleted file mode 100644 index d82d18779..000000000 --- a/util/sdss_psf.py +++ /dev/null @@ -1,90 +0,0 @@ -from astrometry.util.fits import * -from numpy import * -from scipy.ndimage.filters import gaussian_filter - -# Returns (a, sigma1, b, sigma2) -def sdss_dg_psf_params(psfield, band): - T = fits_table(psfield[6].data) - # the psf table has one row. - assert(len(T)) == 1 - T = T[0] - # http://www.sdss.org/dr7/dm/flatFiles/psField.html - # good = PSP_FIELD_OK - if T.status[band] != 0: - print 'T.status[band=%s] =' % band, T.status[band] - assert(T.status[band] == 0) - a = 1.0 - s1 = T.psf_sigma1_2g[band] - b = T.psf_b_2g[band] - s2 = T.psf_sigma2_2g[band] - return (float(a), float(s1), float(b), float(s2)) - -def sdss_dg_psf_apply(img, dgparams): - (a, s1, b, s2) = dgparams - a /= (s1**2 + b*s2**2) - return a * (s1**2 * gaussian_filter(img, s1) + - b * s2**2 * gaussian_filter(img, s2)) - -def sdss_dg_psf(dgparams, shape=(51,51)): - img = zeros(shape) - h,w = shape - img[h/2, w/2] = 1. - return sdss_dg_psf_apply(img, dgparams) - - -# Reconstruct the SDSS model PSF from KL basis functions. -# hdu: the psField hdu for the band you are looking at. -# eg, for r-band: -# psfield = pyfits.open('psField-%06i-%i-%04i.fit' % (run,camcol,field)) -# bandnum = 'ugriz'.index('r') -# hdu = psfield[bandnum+1] -# -# x,y can be scalars or 1-d numpy arrays. -# Return value: -# if x,y are scalars: a PSF image -# if x,y are arrays: a list of PSF images -def sdss_psf_at_points(hdu, x, y): - rtnscalar = isscalar(x) and isscalar(y) - x = atleast_1d(x) - y = atleast_1d(y) - - psf = table_fields(hdu.data) - - psfimgs = None - (outh, outw) = (None,None) - - # From the IDL docs: - # http://photo.astro.princeton.edu/photoop_doc.html#SDSS_PSF_RECON - # acoeff_k = SUM_i{ SUM_j{ (0.001*ROWC)^i * (0.001*COLC)^j * C_k_ij } } - # psfimage = SUM_k{ acoeff_k * RROWS_k } - for k in range(len(psf)): - nrb = psf.nrow_b[k] - ncb = psf.ncol_b[k] - - c = psf.c[k].reshape(5, 5) - c = c[:nrb,:ncb] - - (gridi,gridj) = meshgrid(range(nrb), range(ncb)) - - if psfimgs is None: - psfimgs = [zeros_like(psf.rrows[k]) for xy in broadcast(x,y)] - (outh,outw) = (psf.rnrow[k], psf.rncol[k]) - else: - assert(psf.rnrow[k] == outh) - assert(psf.rncol[k] == outw) - - for i,(xi,yi) in enumerate(broadcast(x,y)): - acoeff_k = sum(((0.001 * xi)**gridi * (0.001 * yi)**gridj * c)) - if False: # DEBUG - print 'coeffs:', (0.001 * xi)**gridi * (0.001 * yi)**gridj - print 'c:', c - for (coi,ci) in zip(((0.001 * xi)**gridi * (0.001 * yi)**gridj).ravel(), c.ravel()): - print 'co %g, c %g' % (coi,ci) - print 'acoeff_k', acoeff_k - psfimgs[i] += acoeff_k * psf.rrows[k] - - psfimgs = [img.reshape((outh,outw)) for img in psfimgs] - - if rtnscalar: - return psfimgs[0] - return psfimgs diff --git a/util/sdss_psfield.py b/util/sdss_psfield.py deleted file mode 100644 index 0529841db..000000000 --- a/util/sdss_psfield.py +++ /dev/null @@ -1,10 +0,0 @@ -from astrometry.util.fits import * -from pyfits import * - -# Returns "gain", "dark_variance", and "skyErr" -def sdss_psfield_noise(psfieldfn, band=None): - p = table_fields(pyfits.open(psfieldfn)[6].data) - p = p[0] - if band is not None: - return (p.gain[band], p.dark_variance[band], p.sky[band], p.skyerr[band]) - return (p.gain, p.dark_variance, p.sky, p.skyerr) diff --git a/util/search-index.c b/util/search-index.c index 487aee930..cdd525272 100644 --- a/util/search-index.c +++ b/util/search-index.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2010, 2012 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/util/setup.py b/util/setup.py index 9a2a76c5f..e0ef38f85 100644 --- a/util/setup.py +++ b/util/setup.py @@ -1,3 +1,5 @@ +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE import os import sys # add .. to pythonpath diff --git a/util/setuputils.py b/util/setuputils.py index fa9bc4e66..12dae422f 100644 --- a/util/setuputils.py +++ b/util/setuputils.py @@ -1,3 +1,5 @@ +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE from run_command import run_command def get_libs(pkg, required=True): diff --git a/util/shell.py b/util/shell.py index 5d241be9e..8e6936929 100644 --- a/util/shell.py +++ b/util/shell.py @@ -1,3 +1,5 @@ +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE def shell_escape(s): repl = ('\\', '|', '&', ';', '(', ')', '<', '>', ' ', '\t', '\n', '$', "'", '"', "`") diff --git a/util/siap.py b/util/siap.py index fffc5cb8a..4c4a1d6ee 100644 --- a/util/siap.py +++ b/util/siap.py @@ -1,3 +1,5 @@ +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE from xml.dom import minidom, Node from numpy import * from astrometry.util.fits import * diff --git a/util/simplexy.c b/util/simplexy.c index 1e64afb0a..87a32c048 100644 --- a/util/simplexy.c +++ b/util/simplexy.c @@ -1,22 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2007 Michael Blanton, Keir Mierle, David W. Hogg, - Sam Roweis and Dustin Lang. - Copyright 2008, 2009 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free - Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA - 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/util/sip-utils.c b/util/sip-utils.c index bd2bbf2fb..5d52709e2 100644 --- a/util/sip-utils.c +++ b/util/sip-utils.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2007 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include #include diff --git a/util/sip.c b/util/sip.c index d3f3d7c14..f5f52ce1c 100644 --- a/util/sip.c +++ b/util/sip.c @@ -1,20 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Keir Mierle, David W. Hogg, Sam Roweis and Dustin Lang. - Copyright 2012 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/util/sip_plot_distortion.py b/util/sip_plot_distortion.py index 1bb3c03fc..a623b57f9 100644 --- a/util/sip_plot_distortion.py +++ b/util/sip_plot_distortion.py @@ -1,3 +1,5 @@ +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE import matplotlib matplotlib.use('Agg') diff --git a/util/sip_qfits.c b/util/sip_qfits.c index 72d628147..a98a13ed1 100644 --- a/util/sip_qfits.c +++ b/util/sip_qfits.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Keir Mierle, David W. Hogg, Sam Roweis and Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/util/sparsematrix.c b/util/sparsematrix.c index 3f74ae9d3..cba08d6e6 100644 --- a/util/sparsematrix.c +++ b/util/sparsematrix.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2010, 2012 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/util/sparsematrix.h b/util/sparsematrix.h index ca91e0107..15b9b57f4 100644 --- a/util/sparsematrix.h +++ b/util/sparsematrix.h @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2010 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ // Just what the world needs, another... diff --git a/util/stages.py b/util/stages.py index 2af6d0393..045ee382c 100644 --- a/util/stages.py +++ b/util/stages.py @@ -1,3 +1,5 @@ +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE import os from astrometry.util.file import * diff --git a/util/starkd.c b/util/starkd.c index 08a9d3f18..56444a67a 100644 --- a/util/starkd.c +++ b/util/starkd.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006-2008 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/util/starutil.c b/util/starutil.c index cf2463946..f84af8a49 100644 --- a/util/starutil.c +++ b/util/starutil.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/util/starutil.py b/util/starutil.py index 965d3ef34..fa6c00618 100644 --- a/util/starutil.py +++ b/util/starutil.py @@ -1,3 +1,5 @@ +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE from math import pi,cos,sin,radians,degrees,asin,atan2,sqrt,acos,floor def hms2ra(h, m, s): diff --git a/util/starutil2.py b/util/starutil2.py index bbc4dedab..c5d17cbeb 100644 --- a/util/starutil2.py +++ b/util/starutil2.py @@ -1,4 +1,6 @@ -#from pylab import * +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE + from math import * # Needed if we're going to exclude pylab :) PIl = 3.1415926535897932384626433832795029 diff --git a/util/starutil_numpy.py b/util/starutil_numpy.py index 76f951b54..105c8cc8a 100644 --- a/util/starutil_numpy.py +++ b/util/starutil_numpy.py @@ -1,3 +1,5 @@ +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE from numpy import * import datetime import numpy as np diff --git a/util/starxy.c b/util/starxy.c index e413fcf94..a12c05224 100644 --- a/util/starxy.c +++ b/util/starxy.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006-2008 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/util/subtable.c b/util/subtable.c index 4d4742b42..86b21c7dd 100644 --- a/util/subtable.c +++ b/util/subtable.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/util/tabsort-main.c b/util/tabsort-main.c index c611fd37b..b0bd65385 100644 --- a/util/tabsort-main.c +++ b/util/tabsort-main.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2008 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/util/tabsort.c b/util/tabsort.c index 418bfb66b..001af5709 100644 --- a/util/tabsort.c +++ b/util/tabsort.c @@ -1,20 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006-2008 Dustin Lang, Keir Mierle and Sam Roweis. - Copyright 2010 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/util/test-psf.py b/util/test-psf.py deleted file mode 100644 index 85c42fba8..000000000 --- a/util/test-psf.py +++ /dev/null @@ -1,59 +0,0 @@ -from astrometry.util.fits import * -from astrometry.util.sdss_psf import * -from pylab import * - -if __name__ == '__main__': - - psfield = pyfits.open('psField-000745-2-0518.fit') - #psField-002830-6-0398.fit - - X = linspace(0, 2048, 7) - Y = linspace(0, 1489, 5) - - band=0 - x,y = 0,0 - psf = sdss_psf_at_points(psfield[band+1], x, y) - psfshape = psf.shape - h,w = psfshape - # Core: - #s = 4 - #vmn,vmx = 0,0.12 - s = 7 - vmn,vmx = 0,0.012 - - psfcut = slice(h/2-s, h/2+s+1),slice(w/2-s, w/2+s+1) - - for band in range(5): - clf() - ploti = 1 - - for iy,y in enumerate(Y): - for ix,x in enumerate(X): - psf = sdss_psf_at_points(psfield[band+1], x, y) - psfshape = psf.shape - subplot(len(Y), len(X), ploti) - ploti += 1 - print 'psf range:', psf.min(), psf.max(), psf.sum() - imshow(psf[psfcut], interpolation='nearest', origin='lower', vmin=vmn, vmax=vmx) - xticks([],[]) - yticks([],[]) - subplots_adjust(wspace=0.05, hspace=0.05) - savefig('psf-%i-kl.png' % band) - - dgp = sdss_dg_psf_params(psfield, band) - #print 'a,s1,b,s2', a,s1,b,s2 - clf() - ploti = 1 - for iy,y in enumerate(Y): - for ix,x in enumerate(X): - psf = sdss_dg_psf(dgp, psfshape) - subplot(len(Y), len(X), ploti) - ploti += 1 - print 'psf range:', psf.min(), psf.max(), psf.sum() - imshow(psf[psfcut], interpolation='nearest', origin='lower', vmin=vmn, vmax=vmx) - xticks([],[]) - yticks([],[]) - - subplots_adjust(wspace=0.05, hspace=0.05) - savefig('psf-%i-dg.png' % band) - diff --git a/util/test_anwcs.c b/util/test_anwcs.c index 3b14a2803..68500edbb 100644 --- a/util/test_anwcs.c +++ b/util/test_anwcs.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2010 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/util/test_big_tables.c b/util/test_big_tables.c index 7cdf18604..06d6e9758 100644 --- a/util/test_big_tables.c +++ b/util/test_big_tables.c @@ -1,3 +1,7 @@ +/* +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE + */ #include #include "fitstable.h" diff --git a/util/test_bl.c b/util/test_bl.c index d494a37e2..81472e8df 100644 --- a/util/test_bl.c +++ b/util/test_bl.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/util/test_bt.c b/util/test_bt.c index 04eef9401..59c040069 100644 --- a/util/test_bt.c +++ b/util/test_bt.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/util/test_convolve_image.c b/util/test_convolve_image.c index 602ed4d65..39d7fb83e 100644 --- a/util/test_convolve_image.c +++ b/util/test_convolve_image.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2011 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/util/test_ctmf.c b/util/test_ctmf.c index 8116f7e64..948e641c7 100644 --- a/util/test_ctmf.c +++ b/util/test_ctmf.c @@ -1,20 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Michael Blanton, Keir Mierle, David W. Hogg, Sam Roweis - and Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/util/test_dcen3x3.c b/util/test_dcen3x3.c index 5e15e6ea2..009c38250 100644 --- a/util/test_dcen3x3.c +++ b/util/test_dcen3x3.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2008 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/util/test_dfind.c b/util/test_dfind.c index 366eb359e..f8e2b8234 100644 --- a/util/test_dfind.c +++ b/util/test_dfind.c @@ -1,20 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Michael Blanton, Keir Mierle, David W. Hogg, Sam Roweis - and Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/util/test_dsmooth.c b/util/test_dsmooth.c index f1e5f7b6e..983b667c1 100644 --- a/util/test_dsmooth.c +++ b/util/test_dsmooth.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2007 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/util/test_endian.c b/util/test_endian.c index 8ee668301..1bf5ca0a0 100644 --- a/util/test_endian.c +++ b/util/test_endian.c @@ -1,3 +1,7 @@ +/* +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE + */ #include #include diff --git a/util/test_errors.c b/util/test_errors.c index 712a99aeb..f0c342cfa 100644 --- a/util/test_errors.c +++ b/util/test_errors.c @@ -1,3 +1,7 @@ +/* +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE + */ #include "errors.h" #include "cutest.h" diff --git a/util/test_fit_wcs.c b/util/test_fit_wcs.c index f5b27ec0c..fc4162645 100644 --- a/util/test_fit_wcs.c +++ b/util/test_fit_wcs.c @@ -1,3 +1,7 @@ +/* +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE + */ #include #include #include diff --git a/util/test_fitsbin.c b/util/test_fitsbin.c index 391cf1fe4..be1062bb6 100644 --- a/util/test_fitsbin.c +++ b/util/test_fitsbin.c @@ -1,3 +1,7 @@ +/* +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE + */ #include #include "fitsbin.h" diff --git a/util/test_fitsioutils.c b/util/test_fitsioutils.c index b39b222fc..1e5be3316 100644 --- a/util/test_fitsioutils.c +++ b/util/test_fitsioutils.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2008 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/util/test_fitstable.c b/util/test_fitstable.c index ea14edcf9..31fba8ce9 100644 --- a/util/test_fitstable.c +++ b/util/test_fitstable.c @@ -1,3 +1,7 @@ +/* +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE + */ #include #include "fitstable.h" diff --git a/util/test_healpix.c b/util/test_healpix.c index 684d22358..c5b5cb999 100644 --- a/util/test_healpix.c +++ b/util/test_healpix.c @@ -1,20 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. - Copyright 2009 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/util/test_hpsplit.py b/util/test_hpsplit.py index ff0e3e091..5934ad259 100644 --- a/util/test_hpsplit.py +++ b/util/test_hpsplit.py @@ -1,3 +1,5 @@ +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE import matplotlib matplotlib.use('Agg') import pylab as plt diff --git a/util/test_ioutils.c b/util/test_ioutils.c index ec1bad315..f57ad67a6 100644 --- a/util/test_ioutils.c +++ b/util/test_ioutils.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2008, 2011 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/util/test_jpl.c b/util/test_jpl.c index 9ea559a85..796b833d2 100644 --- a/util/test_jpl.c +++ b/util/test_jpl.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/util/test_log.c b/util/test_log.c index 0d658965b..aef75d671 100644 --- a/util/test_log.c +++ b/util/test_log.c @@ -1,4 +1,7 @@ - +/* +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE + */ #include "log.h" #include diff --git a/util/test_multiindex.c b/util/test_multiindex.c index 3a4dcf0c9..20013e981 100644 --- a/util/test_multiindex.c +++ b/util/test_multiindex.c @@ -1,3 +1,7 @@ +/* +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE + */ #include #include #include diff --git a/util/test_pyfitsutils.py b/util/test_pyfitsutils.py index 6b8fb9f18..7ef50b386 100644 --- a/util/test_pyfitsutils.py +++ b/util/test_pyfitsutils.py @@ -1,3 +1,7 @@ +/* +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE +*/ from fits import * import numpy as np import unittest diff --git a/util/test_qsort_r.c b/util/test_qsort_r.c index eb22c9d2b..3560cf429 100644 --- a/util/test_qsort_r.c +++ b/util/test_qsort_r.c @@ -1,3 +1,7 @@ +/* +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE + */ #include #include #include diff --git a/util/test_quadfile.c b/util/test_quadfile.c index 8ca0ce068..ca06da83b 100644 --- a/util/test_quadfile.c +++ b/util/test_quadfile.c @@ -1,3 +1,7 @@ +/* +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE + */ #include #include "fitsbin.h" diff --git a/util/test_rdlist.c b/util/test_rdlist.c index 0ad8ad345..2b49f36c0 100644 --- a/util/test_rdlist.c +++ b/util/test_rdlist.c @@ -1,3 +1,7 @@ +/* +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE + */ #include "rdlist.h" #include "fitsioutils.h" #include "qfits_header.h" diff --git a/util/test_scamp_catalog.c b/util/test_scamp_catalog.c index 5e1469b27..561c4589f 100644 --- a/util/test_scamp_catalog.c +++ b/util/test_scamp_catalog.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2008 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include "scamp-catalog.h" diff --git a/util/test_simplexy.c b/util/test_simplexy.c index 0b094aa60..ac011b816 100644 --- a/util/test_simplexy.c +++ b/util/test_simplexy.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2009 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/util/test_sip-utils.c b/util/test_sip-utils.c index 0ad460032..f4482c5d5 100644 --- a/util/test_sip-utils.c +++ b/util/test_sip-utils.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2010 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include #include diff --git a/util/test_starutil.c b/util/test_starutil.c index 1ffc3593b..15f411d79 100644 --- a/util/test_starutil.c +++ b/util/test_starutil.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2008, 2010 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/util/test_svd.c b/util/test_svd.c index 11e4918c0..9a8a4810f 100644 --- a/util/test_svd.c +++ b/util/test_svd.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/util/test_util.py b/util/test_util.py index 15aa23e85..4b772a98a 100644 --- a/util/test_util.py +++ b/util/test_util.py @@ -1,3 +1,5 @@ +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE from util import * import numpy as np import time diff --git a/util/test_wcs.c b/util/test_wcs.c index 68c51a5a3..900fe2da1 100644 --- a/util/test_wcs.c +++ b/util/test_wcs.c @@ -1,3 +1,7 @@ +/* +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE + */ #include "sip.h" #include "sip_qfits.h" #include "anwcs.h" diff --git a/util/test_xylist.c b/util/test_xylist.c index f6a82acb4..1c8a27c02 100644 --- a/util/test_xylist.c +++ b/util/test_xylist.c @@ -1,3 +1,7 @@ +/* +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE + */ #include #include "xylist.h" diff --git a/util/text2fits.py b/util/text2fits.py index b2847d97c..812c260e6 100755 --- a/util/text2fits.py +++ b/util/text2fits.py @@ -1,4 +1,6 @@ #! /usr/bin/env python +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE import sys from optparse import OptionParser import numpy as np diff --git a/util/tic.c b/util/tic.c index 4a072ba0b..4ea4f3c1f 100644 --- a/util/tic.c +++ b/util/tic.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/util/timingpool.py b/util/timingpool.py index 9583f0ddc..5e340325e 100644 --- a/util/timingpool.py +++ b/util/timingpool.py @@ -1,3 +1,5 @@ +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE from __future__ import print_function import multiprocessing.queues diff --git a/util/tpv.c b/util/tpv.c index 74dc9b1f3..a695d4857 100644 --- a/util/tpv.c +++ b/util/tpv.c @@ -1,20 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Keir Mierle, David W. Hogg, Sam Roweis and Dustin Lang. - Copyright 2012 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/util/tstimg.py b/util/tstimg.py deleted file mode 100644 index 60d82833c..000000000 --- a/util/tstimg.py +++ /dev/null @@ -1,18 +0,0 @@ -try: - import pyfits -except ImportError: - try: - from astropy.io import fits as pyfits - except ImportError: - raise ImportError("Cannot import either pyfits or astropy.io.fits") -from numpy import * - -if __name__ == '__main__': - - W,H = 10,10 - sigma = 1. - X,Y = meshgrid(range(W), range(H)) - img = 50 + 200 * exp(-0.5 * ((X - W/2)**2 + (Y - H/2)**2)/(sigma**2)) - pyfits.writeto('tstimg.fits', img, clobber=True) - - diff --git a/util/ttime.py b/util/ttime.py index 79be6b64d..35bd998e8 100644 --- a/util/ttime.py +++ b/util/ttime.py @@ -1,3 +1,5 @@ +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE from __future__ import print_function import os diff --git a/util/uniformize.py b/util/uniformize.py index a0f04251d..7e6348c89 100755 --- a/util/uniformize.py +++ b/util/uniformize.py @@ -1,4 +1,6 @@ #! /usr/bin/env python +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE import os import sys import logging diff --git a/util/usnob_catalog.py b/util/usnob_catalog.py index 8eaaa98cb..209da59cc 100755 --- a/util/usnob_catalog.py +++ b/util/usnob_catalog.py @@ -1,4 +1,6 @@ #! /usr/bin/env python +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE import sys from optparse import OptionParser diff --git a/util/usnob_cuts.py b/util/usnob_cuts.py index 8aea1c16d..5770db6cb 100644 --- a/util/usnob_cuts.py +++ b/util/usnob_cuts.py @@ -1,3 +1,5 @@ +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE import numpy as np def usnob_apply_cuts(X): diff --git a/util/usnob_get_image.py b/util/usnob_get_image.py index b42b8e464..eb03dfe39 100755 --- a/util/usnob_get_image.py +++ b/util/usnob_get_image.py @@ -1,4 +1,6 @@ #! /usr/bin/env python +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE import re import sys diff --git a/util/usnob_get_region.py b/util/usnob_get_region.py index a205ac604..7c890f483 100755 --- a/util/usnob_get_region.py +++ b/util/usnob_get_region.py @@ -1,4 +1,6 @@ #! /usr/bin/env python +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE from urllib2 import urlopen from urllib import urlencode from urlparse import urlparse, urljoin diff --git a/util/usnob_trim.py b/util/usnob_trim.py index 68b9df6f6..45dcf8b08 100644 --- a/util/usnob_trim.py +++ b/util/usnob_trim.py @@ -1,4 +1,6 @@ #! /usr/bin/env python +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE # Used to trim down the "hpslit"-merged USNO-B files before # building indices out of them. diff --git a/util/util.i b/util/util.i index 87ad30965..e377ce0b7 100644 --- a/util/util.i +++ b/util/util.i @@ -1,3 +1,7 @@ +/* +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE + */ %module(package="astrometry.util") util %include diff --git a/util/votabletofits.py b/util/votabletofits.py index 2633f27e5..6d3bdc2ef 100755 --- a/util/votabletofits.py +++ b/util/votabletofits.py @@ -1,4 +1,6 @@ #! /usr/bin/env python +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE from astrometry.util.siap import * from astrometry.util.fits import * diff --git a/util/w3c_validator.py b/util/w3c_validator.py deleted file mode 100644 index 51bb170e8..000000000 --- a/util/w3c_validator.py +++ /dev/null @@ -1,37 +0,0 @@ -import urllib -import tempfile -import os - -class W3CValidator: - def __init__(self, url=None): - if url is None: - self.url = 'http://validator.w3.org/' - else: - self.url = url - - def validateText(self, text): - postdata = urllib.urlencode({ 'fragment' : text }) - (f, filename) = tempfile.mkstemp('.html', 'w3cvalid-') - os.close(f) - (fn, headers) = urllib.urlretrieve(self.url, filename, None, postdata) - key = 'X-W3C-Validator-Status' - if not (key in headers): - print 'W3CValidator: no key "%s" in response headers. Results saved in file %s' % (key, filename) - print 'Headers:' - for (k,v) in headers.items(): - print ' ', k, '=', v - return False - if headers[key] == 'Valid': - os.remove(filename) - return True - print 'W3CValidator: %s = %s. Results saved in file %s' % (key, headers[key], filename) - print 'Headers:' - for (k,v) in headers.items(): - print ' ', k, '=', v - return False - - -if __name__ == '__main__': - v = W3CValidator('http://oven.cosmo.fas.nyu.edu:8888/w3c-markup-validator/check') - v.validateText('') - diff --git a/util/wcs-match.c b/util/wcs-match.c index f4f444e92..848cf4324 100644 --- a/util/wcs-match.c +++ b/util/wcs-match.c @@ -1,3 +1,7 @@ +/* +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE + */ #include #include #include diff --git a/util/wcs-pv2sip.c b/util/wcs-pv2sip.c index a4231d7f1..e70e54580 100644 --- a/util/wcs-pv2sip.c +++ b/util/wcs-pv2sip.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2009 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include #include diff --git a/util/wcs-rd2xy-main.c b/util/wcs-rd2xy-main.c index 8e962fbf8..702403dcb 100644 --- a/util/wcs-rd2xy-main.c +++ b/util/wcs-rd2xy-main.c @@ -1,20 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006-2008 Dustin Lang, Keir Mierle and Sam Roweis. - Copyright 2010, 2013 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/util/wcs-rd2xy.c b/util/wcs-rd2xy.c index 63e06ec4e..7f21bca14 100644 --- a/util/wcs-rd2xy.c +++ b/util/wcs-rd2xy.c @@ -1,20 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006-2008 Dustin Lang, Keir Mierle and Sam Roweis. - Copyright 2009, 2010 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/util/wcs-resample-main.c b/util/wcs-resample-main.c index 9c3c949fd..e08639040 100644 --- a/util/wcs-resample-main.c +++ b/util/wcs-resample-main.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2009, 2010 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/util/wcs-resample.c b/util/wcs-resample.c index 07d11bd04..ab0ac137d 100644 --- a/util/wcs-resample.c +++ b/util/wcs-resample.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2009, 2010 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/util/wcs-resample.h b/util/wcs-resample.h index dfb8b6475..fca18837f 100644 --- a/util/wcs-resample.h +++ b/util/wcs-resample.h @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2009, 2010 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #ifndef WCS_RESAMPLE_H diff --git a/util/wcs-to-tan.c b/util/wcs-to-tan.c index 126e62ed5..dbc353488 100644 --- a/util/wcs-to-tan.c +++ b/util/wcs-to-tan.c @@ -1,3 +1,7 @@ +/* +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE + */ #include "starutil.h" #include "mathutil.h" #include "fit-wcs.h" diff --git a/util/wcs-xy2rd-main.c b/util/wcs-xy2rd-main.c index bb87dc252..13cb85265 100644 --- a/util/wcs-xy2rd-main.c +++ b/util/wcs-xy2rd-main.c @@ -1,20 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006-2008 Dustin Lang, Keir Mierle and Sam Roweis. - Copyright 2013 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/util/wcs-xy2rd.c b/util/wcs-xy2rd.c index 733d5c3e1..0d3c6980b 100644 --- a/util/wcs-xy2rd.c +++ b/util/wcs-xy2rd.c @@ -1,20 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. - Copyright 2008, 2009 Dustin Lang. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/util/wcsinfo.c b/util/wcsinfo.c index 02e85a2b2..c33fa178f 100644 --- a/util/wcsinfo.c +++ b/util/wcsinfo.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include diff --git a/util/xylist.c b/util/xylist.c index a26f36e26..3fd864cff 100644 --- a/util/xylist.c +++ b/util/xylist.c @@ -1,19 +1,6 @@ /* - This file is part of the Astrometry.net suite. - Copyright 2006, 2007 Dustin Lang, Keir Mierle and Sam Roweis. - - The Astrometry.net suite 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, version 2. - - The Astrometry.net suite 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 the Astrometry.net suite ; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# This file is part of the Astrometry.net suite. +# Licensed under a 3-clause BSD style license - see LICENSE */ #include