IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 25, 2008, 8:03:34 AM (18 years ago)
Author:
eugene
Message:

splitting extended model fits and extended parameters

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/unlabeled-1.53.8/psModules/src/objects/pmSourceIO.c

    r15562 r16658  
    33 *  @author EAM, IfA
    44 *
    5  *  @version $Revision: 1.53 $ $Name: not supported by cvs2svn $
    6  *  @date $Date: 2007-11-10 01:09:20 $
     5 *  @version $Revision: 1.53.8.1 $ $Name: not supported by cvs2svn $
     6 *  @date $Date: 2008-02-25 18:03:34 $
    77 *
    88 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    254254    char *dataname = NULL;
    255255    char *xsrcname = NULL;
     256    char *xfitname = NULL;
    256257    char *headname = NULL;
    257258
     
    319320        // if this is not TRUE, the output files only contain the psf measurements.
    320321        bool XSRC_OUTPUT = psMetadataLookupBool(&status, recipe, "SAVE.XSRC");
     322        bool XFIT_OUTPUT = psMetadataLookupBool(&status, recipe, "SAVE.XFIT");
    321323
    322324        // define the EXTNAME values for the different data segments:
     
    356358              }
    357359              xsrcname = pmFPAfileNameFromRule (rule, file, view);
     360            }
     361            if (XFIT_OUTPUT) {
     362              // EXTNAME for extended source data table
     363              rule = psMetadataLookupStr(&status, menu, "CMF.XFIT");
     364              if (!rule) {
     365                psError(PS_ERR_UNKNOWN, true, "missing entry for CMF.XFIT in EXTNAME.RULES in camera.config");
     366                return false;
     367              }
     368              xfitname = pmFPAfileNameFromRule (rule, file, view);
    358369            }
    359370        }
     
    405416            psFree (exttype);
    406417
     418            // if we request XSRC output, add the XSRC name to this header
     419            if (xsrcname) {
     420              psMetadataAddStr (outhead, PS_LIST_TAIL, "XSRCNAME", PS_META_REPLACE, "name of XSRC table extension", xsrcname);
     421            }
     422            if (xfitname) {
     423              psMetadataAddStr (outhead, PS_LIST_TAIL, "XFITNAME", PS_META_REPLACE, "name of XFIT table extension", xfitname);
     424            }
     425
    407426            // XXX these are case-sensitive since the EXTYPE is case-sensitive
    408427            status = false;
     
    416435                status = pmSourcesWrite_PS1_DEV_1 (file->fits, sources, file->header, outhead, dataname, xsrcname);
    417436            }
     437            if (xsrcname) {
     438              if (!strcmp (exttype, "PS1_DEV_1")) {
     439                status = pmSourcesWrite_PS1_DEV_1_XSRC (file->fits, sources, xsrcname);
     440              }
     441            }
     442            if (xfitname) {
     443              if (!strcmp (exttype, "PS1_DEV_1")) {
     444                status = pmSourcesWrite_PS1_DEV_1_XFIT (file->fits, sources, xfitname);
     445              }
     446            }
    418447            if (!status) {
    419448                psError(PS_ERR_IO, false, "writing CMF data to %s with format %s\n", file->filename, exttype);
Note: See TracChangeset for help on using the changeset viewer.