/* $Id: fitsio.c 475 2009-07-28 19:40:50Z jtaylor2 $
*/
/*****************************************************************************/
/* */
/* This file, fitsio.c, contains the core of a set of FITSIO routines that */
/* are used to compress and uncompress image data in FITS binary tables. */
/* The code was copied and modified from the FITSIO software written at */
/* HEASRC. The goal for the pyfitsComp module was to take this code nearly */
/* intact. In FITSIO, interaction with the FITS file is accomplished */
/* directly within the FITSIO code. With pyfitsComp, interaction with the */
/* FITS file is accomplished from within pyfits. This may make some of the */
/* constructs within the FISTIO code seem confusing when viewed from the */
/* perspective of pyfitsComp. It should be noted that the FITSfile */
/* structure acts as the interface to the file in both cases. In FITSIO it */
/* contains the file handle in order to access the file, and in pyfitsComp */
/* it holds the file data, either compressed or uncompressed. */
/* */
/* Copyright (C) 2004 Association of Universities for Research in Astronomy */
/* (AURA) */
/* */
/* Redistribution and use in source and binary forms, with or without */
/* modification, are permitted provided that the following conditions are */
/* met: */
/* */
/* 1. Redistributions of source code must retain the above copyright */
/* notice, this list of conditions and the following disclaimer. */
/* */
/* 2. Redistributions in binary form must reproduce the above */
/* copyright notice, this list of conditions and the following */
/* disclaimer in the documentation and/or other materials provided */
/* with the distribution. */
/* */
/* 3. The name of AURA and its representatives may not be used to */
/* endorse or promote products derived from this software without */
/* specific prior written permission. */
/* */
/* THIS SOFTWARE IS PROVIDED BY AURA ``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 AURA 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. */
/* */
/* This file contains source code that was copied and modified from the */
/* FITSIO software that was written by William Pence at the High Energy */
/* Astrophysic Science Archive Research Center (HEASARC) at the NASA Goddard */
/* Space Flight Center. That software contained the following copyright and */
/* warranty notices: */
/* */
/* Copyright (Unpublished--all rights reserved under the copyright laws of */
/* the United States), U.S. Government as represented by the Administrator */
/* of the National Aeronautics and Space Administration. No copyright is */
/* claimed in the United States under Title 17, U.S. Code. */
/* */
/* Permission to freely use, copy, modify, and distribute this software */
/* and its documentation without fee is hereby granted, provided that this */
/* copyright notice and disclaimer of warranty appears in all copies. */
/* */
/* DISCLAIMER: */
/* */
/* THE SOFTWARE IS PROVIDED 'AS IS' WITHOUT ANY WARRANTY OF ANY KIND, */
/* EITHER EXPRESSED, IMPLIED, OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, */
/* ANY WARRANTY THAT THE SOFTWARE WILL CONFORM TO SPECIFICATIONS, ANY */
/* IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR */
/* PURPOSE, AND FREEDOM FROM INFRINGEMENT, AND ANY WARRANTY THAT THE */
/* DOCUMENTATION WILL CONFORM TO THE SOFTWARE, OR ANY WARRANTY THAT THE */
/* SOFTWARE WILL BE ERROR FREE. IN NO EVENT SHALL NASA BE LIABLE FOR ANY */
/* DAMAGES, INCLUDING, BUT NOT LIMITED TO, DIRECT, INDIRECT, SPECIAL OR */
/* CONSEQUENTIAL DAMAGES, ARISING OUT OF, RESULTING FROM, OR IN ANY WAY */
/* CONNECTED WITH THIS SOFTWARE, WHETHER OR NOT BASED UPON WARRANTY, */
/* CONTRACT, TORT , OR OTHERWISE, WHETHER OR NOT INJURY WAS SUSTAINED BY */
/* PERSONS OR PROPERTY OR OTHERWISE, AND WHETHER OR NOT LOSS WAS SUSTAINED */
/* FROM, OR AROSE OUT OF THE RESULTS OF, OR USE OF, THE SOFTWARE OR */
/* SERVICES PROVIDED HEREUNDER." */
/* */
/*****************************************************************************/
#include <math.h>
#include <stdlib.h>
#include <limits.h>
#include <string.h>
#include "fitsio.h"
/*****************************************************************************/
/* */
/* The following code was copied and modified from the FITSIO source code */
/* file fitscore.c. */
/* */
/*****************************************************************************/
#define GetMesg 4 /* pop and return the message */
#define PutMesg 5 /* put a new message */
/*--------------------------------------------------------------------------*/
void ffxmsg( int action,
char *errmsg)
/*
general routine to get or put an error message to the error buffer.
Action Code:
GetMesg 4 pop and return the message
PutMesg 5 add a new message to the buffer
*/
{
static char errbuff[81]; /* error buffer */
static int firstTime = 1;
if (firstTime)
{
firstTime = 0;
errbuff[0] = '\0';
}
if (action == GetMesg) /* pop and return oldest message from stack */
{ /* ignoring markers */
strcpy(errmsg, errbuff); /* copy message to output */
}
else if (action == PutMesg) /* add new message to stack */
{
strncpy(errbuff, errmsg, 80);
}
return;
}
/*--------------------------------------------------------------------------*/
void ffpmsg(const char *err_message)
/*
put message
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
共29个文件
py:16个
c:12个
pkg-info:1个
资源分类:Python库 所属语言:Python 资源全名:pyfits-2.3.1.tar.gz 资源来源:官方 安装方法:https://lanzao.blog.csdn.net/article/details/101784059
资源推荐
资源详情
资源评论
收起资源包目录
pyfits-2.3.1.tar.gz (29个子文件)
pyfits-2.3.1
PKG-INFO 378B
stsci_distutils_hack.py 9KB
src
pyfitsCompWrapper.c 32KB
fitsio.c 221KB
trees.c 49KB
inftrees.c 19KB
compress.c 15KB
zlib.c 112KB
inffast.c 19KB
fits_hcompress.c 51KB
fits_hdecompress.c 78KB
pliocomp.c 12KB
quantize.c 78KB
ricecomp.c 40KB
setup.py 1KB
lib
rec.py 20KB
core.py 406KB
svn_version.py 166B
tests
testPyfitsDivision.py 3KB
testPyfitsChecksum.py 8KB
testPyfitsTable.py 66KB
testCore.py 2KB
testPyfitsHDUList.py 25KB
__init__.py 50B
testStructured.py 3KB
testPyfitsImage.py 26KB
testUint.py 3KB
__init__.py 879B
defsetup.py 2KB
共 29 条
- 1
资源评论
- silkworm20062023-06-26资源中能够借鉴的内容很多,值得学习的地方也很多,大家一起进步!
挣扎的蓝藻
- 粉丝: 13w+
- 资源: 15万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 写入三菱plcD位寄存器的值
- 确保你的操作系统符合Docker的要求 Docker支持的操作系统包括Ubuntu、Debian、CentOS、Fedora和m
- 确保你的操作系统符合Docker的要求 Docker支持的操作系统包括Ubuntu、Debian、CentOS、Fedora和m
- HDMI 虚拟软件欺骗器
- 确保你的操作系统符合Docker的要求 Docker支持的操作系统包括Ubuntu、Debian、CentOS、Fedora和m
- 读取三菱PLC D位寄存器
- HDMI edid 编辑工具
- 要在你的计算机上安装Docker,你可以按照以下步骤进行:
- 要在你的计算机上安装Docker,你可以按照以下步骤进行:
- html加JavaScript进行表单验证
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功