IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jan 2, 2008, 10:45:23 AM (18 years ago)
Author:
gusciora
Message:

Significant changes and additions.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/test/objects/tap_pmSourceIO_PS1_DEV_0.c

    r15726 r15985  
    55#include "tap.h"
    66#include "pstap.h"
     7/* STATUS:
     8    All functions are tested.
     9    XX: These tests read/write a file.  Must choose a more unique name.
     10*/
    711
    812#define VERBOSE                 0
     
    1014#define TEST_FLOATS_EQUAL(X, Y) (abs(X - Y) < 0.0001)
    1115#define NUM_SOURCES             5
     16#define FITS_FILENAME  ".tmp00"
    1217int main(int argc, char* argv[])
    1318{
     
    2025    // ----------------------------------------------------------------------
    2126    // pmSourcesWrite_PS1_DEV_0() tests
    22     // bool pmSourcesWrite_PS1_DEV_0 (psFits *fits, psArray *sources,
    23     //      psMetadata *imageHeader, psMetadata *tableHeader, char *extname)
    2427    // Call pmSourcesWrite_PS1_DEV_0() with NULL psFits input parameter
    25     if (1) {
    26         psMemId id = psMemGetId();
    27         psFits* fitsFile = psFitsOpen(".tmp00", "w");
     28    {
     29        psMemId id = psMemGetId();
     30        psFits* fitsFile = psFitsOpen(FITS_FILENAME, "w");
    2831        psArray *sources = psArrayAlloc(NUM_SOURCES);
    2932        for (int i = 0 ; i < sources->n ; i++) {
     
    4851
    4952    // Call pmSourcesWrite_PS1_DEV_0() with NULL pmSource input parameter
    50     if (1) {
    51         psMemId id = psMemGetId();
    52         psFits* fitsFile = psFitsOpen(".tmp00", "w");
     53    {
     54        psMemId id = psMemGetId();
     55        psFits* fitsFile = psFitsOpen(FITS_FILENAME, "w");
    5356        psArray *sources = psArrayAlloc(NUM_SOURCES);
    5457        for (int i = 0 ; i < sources->n ; i++) {
     
    7275
    7376    // Call pmSourcesWrite_PS1_DEV_0() with NULL extname input parameter
    74     if (1) {
    75         psMemId id = psMemGetId();
    76         psFits* fitsFile = psFitsOpen(".tmp00", "w");
     77    {
     78        psMemId id = psMemGetId();
     79        psFits* fitsFile = psFitsOpen(FITS_FILENAME, "w");
    7780        psArray *sources = psArrayAlloc(NUM_SOURCES);
    7881        for (int i = 0 ; i < sources->n ; i++) {
     
    97100    // ----------------------------------------------------------------------
    98101    // pmSourcesRead_PS1_DEV_0() tests
    99     // psArray *pmSourcesRead_PS1_DEV_0 (psFits *fits, psMetadata *header)
    100     //
    101102    // Call pmSourcesRead_PS1_DEV_0() with NULL psFits input parameter
    102     if (1) {
    103         psMemId id = psMemGetId();
    104         psFits* fitsFile = psFitsOpen(".tmp00", "r");
     103    {
     104        psMemId id = psMemGetId();
     105        psFits* fitsFile = psFitsOpen(FITS_FILENAME, "r");
    105106        psMetadata *header = psMetadataAlloc();
    106107        psArray *array = pmSourcesRead_PS1_DEV_0(NULL, header);
     
    113114
    114115    // Call pmSourcesRead_PS1_DEV_0() with NULL header input parameter
    115     if (1) {
    116         psMemId id = psMemGetId();
    117         psFits* fitsFile = psFitsOpen(".tmp00", "r");
     116    {
     117        psMemId id = psMemGetId();
     118        psFits* fitsFile = psFitsOpen(FITS_FILENAME, "r");
    118119        psMetadata *header = psMetadataAlloc();
    119120        psArray *array = pmSourcesRead_PS1_DEV_0(fitsFile, NULL);
     
    137138    #define TEST_BASE_PIX_WEIGHT        90.0
    138139    #define TEST_BASE_PEAK_FLUX 120.0
    139     if (1) {
    140         psMemId id = psMemGetId();
    141         psFits* fitsFile = psFitsOpen(".tmp00", "w");
     140    {
     141        psMemId id = psMemGetId();
     142        psFits* fitsFile = psFitsOpen(FITS_FILENAME, "w");
    142143        psArray *sources = psArrayAlloc(NUM_SOURCES);
    143144        for (int i = 0 ; i < sources->n ; i++) {
     
    187188
    188189    // Call pmSourcesRead_PS1_DEV_0() with acceptable input parameters
    189     if (1) {
    190         psMemId id = psMemGetId();
    191         psFits* fitsFile = psFitsOpen(".tmp00", "r");
     190    {
     191        psMemId id = psMemGetId();
     192        psFits* fitsFile = psFitsOpen(FITS_FILENAME, "r");
    192193        psMetadata *header = psMetadataAlloc();
    193194        psArray *array = pmSourcesRead_PS1_DEV_0(fitsFile, header);
Note: See TracChangeset for help on using the changeset viewer.