IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Nov 28, 2005, 2:27:22 PM (20 years ago)
Author:
Paul Price
Message:

Adding pmChipMosaic

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/archive/scripts/src/phase2/papPhase2.c

    r5583 r5621  
    1616#include "pmNonLinear.h"
    1717#include "pmSubtractBias.h"
     18#include "pmChipMosaic.h"
    1819
    1920// Phase 2 needs to:
     
    8182#endif
    8283
    83     psTraceSetLevel("pmConfigCameraFromHeader", 10);
     84    psTimerStart("phase2");
    8485
    8586    // Parse the configurations
     
    276277        psLogMsg("phase2", PS_LOG_INFO, "Operating only on chip %d\n", chipNum);
    277278    }
     279
     280    psLogMsg("phase2", PS_LOG_INFO, "Setup completed after %f sec.\n", psTimerMark("phase2"));
    278281
    279282    // Read in the input pixels
     
    447450    }
    448451   
     452    psLogMsg("phase2", PS_LOG_INFO, "Input completed after %f sec.\n", psTimerMark("phase2"));
     453
    449454    psArray *inputChips = input->chips; // Array of chips in input image
    450455    psArray *biasChips = bias->chips;   // Array of chips in bias image
     
    766771                // XXX: Temporary: until the other functions are altered to do this themselves.
    767772                // Trim, so that flat, fringe etc computations are faster.
     773#if 0
    768774#ifndef PRODUCTION
    769775                psRegion *trimRegion = psMetadataLookupPtr(NULL, inputCell->concepts, "CELL.TRIMSEC");
     
    772778                inputReadout->image = trimmed;
    773779#endif
    774 
     780#endif
    775781                // Flat-field correction
    776782                if (doFlat) {
     
    804810                }
    805811
     812
    806813            } // Iterating over readouts
    807814        } // Iterating over cells
     815
     816        // Testing pmChipMosaic
     817        {
     818            psImage *mosaic = pmChipMosaic(inputChip, 1, 1); // Mosaic of chip
     819            psFits *mosaicFile = psFitsAlloc("mosaic.fits"); // FITS file to which to write
     820            psFitsWriteImage(mosaicFile, NULL, mosaic, 0);
     821            psFree(mosaicFile);
     822            psFree(mosaic);             
     823        }
     824 
    808825    } // Iterating over chips
     826
     827    psLogMsg("phase2", PS_LOG_INFO, "Processing completed after %f sec.\n", psTimerMark("phase2"));
    809828
    810829    // Write the output
     
    812831    pmFPAWriteMask(input, outputFile);
    813832    pmFPAWriteWeight(input, outputFile);
     833
     834    psLogMsg("phase2", PS_LOG_INFO, "Output completed after %f sec.\n", psTimerMark("phase2"));
    814835
    815836#ifdef PRODUCTION
     
    831852    psFree(overscanFit);
    832853    psFree(overscanStats);
     854
     855    psLogMsg("phase2", PS_LOG_INFO, "Cleanup completed after %f sec.\n", psTimerMark("phase2"));
     856    psTimerStop();
    833857
    834858#if 1
Note: See TracChangeset for help on using the changeset viewer.