IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 18, 2007, 12:03:21 PM (19 years ago)
Author:
magnier
Message:

added pmConceptsReadCell to pmSourceReadCell; modified pmSourceWrite_ APIs for CMF formats

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/objects/pmSourceIO.c

    r12464 r12481  
    33 *  @author EAM, IfA
    44 *
    5  *  @version $Revision: 1.26 $ $Name: not supported by cvs2svn $
    6  *  @date $Date: 2007-03-16 01:48:55 $
     5 *  @version $Revision: 1.27 $ $Name: not supported by cvs2svn $
     6 *  @date $Date: 2007-03-18 22:03:08 $
    77 *
    88 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    2222#include "pmFPAview.h"
    2323#include "pmFPAfile.h"
     24#include "pmConcepts.h"
    2425
    2526#include "pmPeaks.h"
     
    333334        }
    334335
    335         // create a header to hold the output data
    336         outhead = psMetadataAlloc ();
    337 
    338         // save psphot and psastro metadata in the image and table headers
    339         // XXX this is a bit silly: we are duplicating these because I'm not sure which
    340         // I need to keep for multi-readout images...
    341         updates = psMetadataLookupPtr (&status, readout->analysis, "PSPHOT.HEADER");
    342         if (updates) {
    343             psMetadataCopy (outhead, updates);
    344         }
    345         updates = psMetadataLookupPtr (&status, readout->analysis, "PSASTRO.HEADER");
    346         if (updates) {
    347             psMetadataCopy (outhead, updates);
    348         }
    349 
     336        // create a header to hold the output data
     337        outhead = psMetadataAlloc ();
     338
     339        // determine the output table format
    350340        psMetadata *recipe = psMetadataLookupMetadata(&status, config->recipes, "PSPHOT");
    351341        if (!status) {
     
    358348        }
    359349
     350        // write the links to the image header
    360351        psMetadataAddStr (outhead, PS_LIST_TAIL, "EXTHEAD", PS_META_REPLACE, "name of image extension w/", headname);
    361352        psMetadataAddStr (outhead, PS_LIST_TAIL, "EXTTYPE", PS_META_REPLACE, "extension type", exttype);
     
    365356        status = false;
    366357        if (!strcmp (exttype, "SMPDATA")) {
    367             status = pmSourcesWrite_SMPDATA (file->fits, sources, outhead, dataname);
     358            status = pmSourcesWrite_SMPDATA (file->fits, sources, file->header, outhead, dataname);
    368359        }
    369360        if (!strcmp (exttype, "PS1_DEV_0")) {
    370             status = pmSourcesWrite_PS1_DEV_0 (file->fits, sources, outhead, dataname);
     361            status = pmSourcesWrite_PS1_DEV_0 (file->fits, sources, file->header, outhead, dataname);
    371362        }
    372363
     
    466457        pmReadout *readout = cell->readouts->data[i];
    467458        pmReadoutReadObjects (readout, view, file, config);
     459
     460        // load in the concept information for this cell
     461        if (!pmConceptsReadCell(cell, PM_CONCEPT_SOURCE_HEADER, true, NULL)) {
     462            //psError(PS_ERR_UNKNOWN, false, "Failed to read concepts for cell");
     463            //return false;
     464            psWarning("Difficulty reading concepts for cell; attempting to proceed.");
     465        }
     466
    468467        cell->data_exists = true;
    469468    }
Note: See TracChangeset for help on using the changeset viewer.