IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 28, 2008, 8:57:01 AM (18 years ago)
Author:
eugene
Message:

use name of pmFPAfileIO carrier to name readout->analysis entry

File:
1 edited

Legend:

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

    r17635 r17826  
    33 *  @author EAM, IfA
    44 *
    5  *  @version $Revision: 1.57 $ $Name: not supported by cvs2svn $
    6  *  @date $Date: 2008-05-12 21:52:18 $
     5 *  @version $Revision: 1.58 $ $Name: not supported by cvs2svn $
     6 *  @date $Date: 2008-05-28 18:57:01 $
    77 *
    88 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    258258
    259259    // XXX if sources is NULL, skip the cell or write out empty tables?
    260     psArray *sources = psMetadataLookupPtr (&status, readout->analysis, "PSPHOT.SOURCES");
     260    // XXX if we use the file->name here, then we can use different pmFPAfiles for source output
     261    psArray *sources = psMetadataLookupPtr (&status, readout->analysis, file->name);
    261262    if (!sources) {
    262263        sources = psArrayAlloc(0);
    263         psMetadataAddArray(readout->analysis, PS_LIST_TAIL, "PSPHOT.SOURCES", PS_META_REPLACE,
    264                            "Blank array of sources", sources);
    265         psFree(sources);                // Held onto by the metadata, so we can continue to use
     264        psMetadataAddArray(readout->analysis, PS_LIST_TAIL, file->name, PS_META_REPLACE, "Blank array of sources", sources);
     265        psFree(sources); // Held onto by the metadata, so we can continue to use
    266266    }
    267267
     
    872872    }
    873873    readout->data_exists = true;
    874     status = psMetadataAdd (readout->analysis, PS_LIST_TAIL, "PSPHOT.SOURCES", PS_DATA_ARRAY, "psphot sources", sources);
     874    status = psMetadataAdd (readout->analysis, PS_LIST_TAIL, file->name, PS_DATA_ARRAY, "input sources", sources);
    875875    psFree (sources);
    876876    return true;
     
    886886
    887887    if (view->chip == -1) {
    888         bool exists = pmFPACheckDataStatusForSources (fpa);
     888        bool exists = pmFPACheckDataStatusForSources (fpa, name);
    889889        return exists;
    890890    }
     
    896896
    897897    if (view->cell == -1) {
    898         bool exists = pmChipCheckDataStatusForSources (chip);
     898        bool exists = pmChipCheckDataStatusForSources (chip, name);
    899899        return exists;
    900900    }
     
    906906
    907907    if (view->readout == -1) {
    908         bool exists = pmCellCheckDataStatusForSources (cell);
     908        bool exists = pmCellCheckDataStatusForSources (cell, name);
    909909        return exists;
    910910    }
     
    916916    pmReadout *readout = cell->readouts->data[view->readout];
    917917
    918     bool exists = pmReadoutCheckDataStatusForSources (readout);
     918    bool exists = pmReadoutCheckDataStatusForSources (readout, file->name);
    919919    return exists;
    920920}
    921921
    922 bool pmFPACheckDataStatusForSources (const pmFPA *fpa)
     922bool pmFPACheckDataStatusForSources (const pmFPA *fpa, const char *name)
    923923{
    924924    PS_ASSERT_PTR_NON_NULL(fpa, false);
     
    928928        pmChip *chip = fpa->chips->data[i];
    929929        if (!chip) continue;
    930         if (pmChipCheckDataStatusForSources (chip)) return true;
     930        if (pmChipCheckDataStatusForSources (chip, name)) return true;
    931931    }
    932932    return false;
    933933}
    934934
    935 bool pmChipCheckDataStatusForSources (const pmChip *chip)
     935bool pmChipCheckDataStatusForSources (const pmChip *chip, const char *name)
    936936{
    937937    PS_ASSERT_PTR_NON_NULL(chip, false);
     
    941941        pmCell *cell = chip->cells->data[i];
    942942        if (!cell) continue;
    943         if (pmCellCheckDataStatusForSources (cell)) return true;
     943        if (pmCellCheckDataStatusForSources (cell, name)) return true;
    944944    }
    945945    return false;
    946946}
    947947
    948 bool pmCellCheckDataStatusForSources (const pmCell *cell)
     948bool pmCellCheckDataStatusForSources (const pmCell *cell, const char *name)
    949949{
    950950    PS_ASSERT_PTR_NON_NULL(cell, false);
     
    954954        pmReadout *readout = cell->readouts->data[i];
    955955        if (!readout) continue;
    956         if (pmReadoutCheckDataStatusForSources (readout)) return true;
     956        if (pmReadoutCheckDataStatusForSources (readout, name)) return true;
    957957    }
    958958    return false;
    959959}
    960960
    961 bool pmReadoutCheckDataStatusForSources (const pmReadout *readout)
     961bool pmReadoutCheckDataStatusForSources (const pmReadout *readout, const char *name)
    962962{
    963963    PS_ASSERT_PTR_NON_NULL(readout, false);
     
    966966
    967967    // select the psf of interest
    968     pmPSF *psf = psMetadataLookupPtr (&status, readout->analysis, "PSPHOT.SOURCES");
     968    pmPSF *psf = psMetadataLookupPtr (&status, readout->analysis, name);
    969969    if (!psf) return false;
    970970    return true;
Note: See TracChangeset for help on using the changeset viewer.