IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jan 20, 2006, 8:57:16 PM (21 years ago)
Author:
eugene
Message:

modifications to support psphot on pmReadout with full IPP config files

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psphot/src/psphotTest.c

    r5993 r6117  
    1515int main (int argc, char **argv) {
    1616
    17     psMetadata *row;
    18     psArray *table;
    19 
    20     psMetadataItem *mdi;
    2117    psRegion region = {0,0,0,0};        // a region representing the entire array
    22 
    2318    psphotTestArguments (&argc, argv);
    2419
     
    2722    psImage *image = psFitsReadImage (NULL, file, region, 0);
    2823    psFitsClose (file);
     24
     25    psImageJpegColormap (argv[5]);
     26
     27    // psImage *fimage = psImageCopy (NULL, image, PS_TYPE_F32);
     28
     29    int binning = atof(argv[6]);
     30
     31    psStats *stats = psStatsAlloc (PS_STAT_SAMPLE_MEAN);
     32    psImage *fimage = psImageRebin (NULL, image, NULL, 0, binning, stats);
     33
     34    float min = atof(argv[3]);
     35    float max = atof(argv[4]);
     36
     37    psImageJpeg (fimage, argv[2], min, max);
     38
     39    psFree (header);
     40    psFree (image);
     41    exit (0);
     42}
     43
     44
     45# if (0)
     46
     47    psMetadata *row;
     48    psArray *table;
     49
     50    psMetadataItem *mdi;
    2951
    3052    psMetadataConfigWrite (header, argv[2]);
     
    5981    psFitsWriteHeader (header, fits);
    6082    psFitsWriteTable (fits, theader, table);
    61     psFitsClose (fits);
    6283
    63     psFree (header);
    64     psFree (image);
    65     exit (0);
    66 }
     84# endif
Note: See TracChangeset for help on using the changeset viewer.