IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 3673


Ignore:
Timestamp:
Apr 5, 2005, 5:59:11 PM (21 years ago)
Author:
Paul Price
Message:

Programs seem to be working nicely.

Location:
trunk/stac/src
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/stac/src/Makefile

    r3669 r3673  
    55LDFLAGS += $(PSLIB)
    66
    7 STAC = stac.o stacConfig.o stacRead.o stacErrorImages.o stacTransform.o stacCheckMemory.o \
    8         stacCombine.o stacInvertMaps.o stacRejection.o stacAreaOfInterest.o stacSize.o stacScales.o \
    9         stacHelp.o
     7STAC = stac.o stacConfig.o stacRead.o stacErrorImages.o stacTransform.o stacCheckMemory.o stacHelp.o \
     8        stacCombine.o stacInvertMaps.o stacRejection.o stacAreaOfInterest.o stacSize.o stacScales.o time.o
    109
    1110SHIFT = shift.o stacRead.o stacTransform.o stacCheckMemory.o stacInvertMaps.o stacSize.o
    1211
     12COMBINE = combine.o combineConfig.o stacRead.o stacErrorImages.o stacCombine.o stacScales.o \
     13        stacCheckMemory.o time.o
     14
    1315SHIFTSIZE = shiftSize.o stacWrite.o stacConfig.o stacRead.o stacCheckMemory.o stacSize.o
    1416
    15 .PHONY: tags clean empty test profile optimise
     17TARGETS = stac shift combine shiftSize
     18
     19.PHONY: tags clean empty test profile optimise all
    1620
    1721.c.o:
     
    2428                $(CC) $(CFLAGS) -o $@ $(SHIFT) $(LDFLAGS) $(OPTFLAGS)
    2529
     30combine:        $(COMBINE)
     31                $(CC) $(CFLAGS) -o $@ $(COMBINE) $(LDFLAGS) $(OPTFLAGS)
     32
    2633shiftSize:      $(SHIFTSIZE)
    2734                $(CC) $(CFLAGS) -o $@ $(SHIFTSIZE) $(LDFLAGS) $(OPTFLAGS)
     35
     36all:            $(TARGETS)
    2837
    2938clean:
     
    3140
    3241empty:          clean
    33                 -$(RM) $(TARGET) TAGS
     42                -$(RM) $(TARGETS) TAGS
    3443
    3544test:           stac test_0.fits test_1.fits test_2.fits test_3.fits
  • trunk/stac/src/shift.c

    r3669 r3673  
    1111{
    1212    fprintf (stderr, "shift: shift an image, given the transformation\n"
    13              "Usage: %s [-h] [-v] [-s NX NY] OUT IN\n"
     13             "Usage: %s [-h] [-v] [-s NX NY] IN OUT\n"
    1414             "where\n"
    1515             "\t-h           Help (this info)\n"
    1616             "\t-v           Increase verbosity level\n"
    1717             "\t-s NX NY     Size of output image\n"
    18              "\tOUT          Output image\n"
    19              "\tIN           Input image, which has associated .map file.\n",
     18             "\tIN           Input image, which has associated .map file\n"
     19             "\tOUT          Output image\n",
    2020             programName
    2121        );
  • trunk/stac/src/stac.c

    r3667 r3673  
    55#include <sys/time.h>
    66
    7 double getTime(void)
    8 /* Gets the current time.  Got this from Nick Kaiser's fetchpix.c */
    9 {
    10     struct timeval tv;
    11     gettimeofday(&tv, NULL);
    12     return(tv.tv_sec + 1.e-6 * tv.tv_usec);
    13 }
    14 
    15 
    167int main(int argc, char **argv)
    178{
    18 
    199    double startTime = getTime();
    2010
  • trunk/stac/src/stac.h

    r3667 r3673  
    33
    44#include "pslib.h"
    5 
    65#define abs(x) ((x) >= 0 ? (x) : (-(x)))
    7 
    86#define MAXCHAR 80
     7
     8/************************************************************************************************************/
     9
     10// time.c
    911
    1012// Get the current time
  • trunk/stac/src/stacCombine.c

    r3666 r3673  
    6767    )
    6868{
     69    assert(combined);
     70    assert(images);
     71    assert(errors);
     72    assert(images->n == errors->n);
     73    assert(saturated);
     74    assert(bad);
     75    assert(saturated->n == images->n);
     76    assert(bad->n == images->n);
     77
    6978    int nImages = images->n;            // Number of images
    7079    int numRows = ((psImage*)images->data[0])->numRows; // Image size
  • trunk/stac/src/stacScales.c

    r3666 r3673  
    121121            starCoordsTransformed->data[i] = psPlaneTransformApply(NULL, starMap, starCoords->data[i]);
    122122        }
     123        psFree(starMap);
    123124
    124125        psArray *stars = psArrayAlloc(images->n); // Array of stellar photometry vectors
     
    175176            masks->data[i] = mask;
    176177        }
     178        psFree(starCoords);
     179        psFree(starCoordsTransformed);
    177180
    178181        // Get the scales
Note: See TracChangeset for help on using the changeset viewer.