IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 10421


Ignore:
Timestamp:
Dec 3, 2006, 8:48:10 AM (19 years ago)
Author:
magnier
Message:

defined pmConfigConvertFilename, added to all I/O functions

Location:
trunk/psModules/src
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/camera/pmFPA_JPEG.c

    r10417 r10421  
    55 *  @author EAM, IfA
    66 *
    7  *  @version $Revision: 1.13 $ $Name: not supported by cvs2svn $
    8  *  @date $Date: 2006-12-02 04:24:48 $
     7 *  @version $Revision: 1.14 $ $Name: not supported by cvs2svn $
     8 *  @date $Date: 2006-12-03 18:48:10 $
    99 *
    1010 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    3131
    3232
    33 bool pmFPAviewWriteJPEG(const pmFPAview *view, pmFPAfile *file)
     33bool pmFPAviewWriteJPEG(const pmFPAview *view, pmFPAfile *file, pmConfig *config)
    3434{
    3535    PS_ASSERT_PTR_NON_NULL(view, false);
     
    3939
    4040    if (view->chip == -1) {
    41         pmFPAWriteJPEG (fpa, view, file);
     41        pmFPAWriteJPEG (fpa, view, file, config);
    4242        return true;
    4343    }
     
    4949
    5050    if (view->cell == -1) {
    51         pmChipWriteJPEG (chip, view, file);
     51        pmChipWriteJPEG (chip, view, file, config);
    5252        return true;
    5353    }
     
    5959
    6060    if (view->readout == -1) {
    61         pmCellWriteJPEG (cell, view, file);
     61        pmCellWriteJPEG (cell, view, file, config);
    6262        return true;
    6363    }
     
    6868    pmReadout *readout = cell->readouts->data[view->readout];
    6969
    70     pmReadoutWriteJPEG (readout, view, file);
     70    pmReadoutWriteJPEG (readout, view, file, config);
    7171    return true;
    7272}
    7373
    7474// read in all chip-level JPEG files for this FPA
    75 bool pmFPAWriteJPEG (pmFPA *fpa, const pmFPAview *view, pmFPAfile *file)
     75bool pmFPAWriteJPEG (pmFPA *fpa, const pmFPAview *view, pmFPAfile *file, pmConfig *config)
    7676{
    7777    PS_ASSERT_PTR_NON_NULL(fpa, false);
     
    8282
    8383        pmChip *chip = fpa->chips->data[i];
    84         pmChipWriteJPEG (chip, view, file);
     84        pmChipWriteJPEG (chip, view, file, config);
    8585    }
    8686    return true;
     
    8888
    8989// read in all cell-level JPEG files for this chip
    90 bool pmChipWriteJPEG (pmChip *chip, const pmFPAview *view, pmFPAfile *file)
     90bool pmChipWriteJPEG (pmChip *chip, const pmFPAview *view, pmFPAfile *file, pmConfig *config)
    9191{
    9292    PS_ASSERT_PTR_NON_NULL(chip, false);
     
    9797
    9898        pmCell *cell = chip->cells->data[i];
    99         pmCellWriteJPEG (cell, view, file);
     99        pmCellWriteJPEG (cell, view, file, config);
    100100    }
    101101    return true;
     
    103103
    104104// read in all readout-level JPEG files for this cell
    105 bool pmCellWriteJPEG (pmCell *cell, const pmFPAview *view, pmFPAfile *file)
     105bool pmCellWriteJPEG (pmCell *cell, const pmFPAview *view, pmFPAfile *file, pmConfig *config)
    106106{
    107107    PS_ASSERT_PTR_NON_NULL(cell, false);
     
    112112
    113113        pmReadout *readout = cell->readouts->data[i];
    114         pmReadoutWriteJPEG (readout, view, file);
     114        pmReadoutWriteJPEG (readout, view, file, config);
    115115    }
    116116    return true;
     
    118118
    119119// read in all readout-level Objects files for this cell
    120 bool pmReadoutWriteJPEG (pmReadout *readout, const pmFPAview *view, pmFPAfile *file)
     120bool pmReadoutWriteJPEG (pmReadout *readout, const pmFPAview *view, pmFPAfile *file, pmConfig *config)
    121121{
    122122    PS_ASSERT_PTR_NON_NULL(readout, false);
     
    178178
    179179    psString name = pmFPAfileNameFromRule (file->filerule, file, view);
     180    psString newName = pmConfigConvertFilename (name, config);
    180181    psString mapname = pmFPAfileNameFromRule (file->filextra, file, view);
    181182    psImageJpegColormap *map = psImageJpegColormapSet (NULL, mapname);
     
    185186    }
    186187
    187     psImageJpeg (map, readout->image, name, min, max);
     188    psImageJpeg (map, readout->image, newName, min, max);
     189    psFree(newName);
    188190    psFree(name);
    189191    psFree(map);
  • trunk/psModules/src/camera/pmFPA_JPEG.h

    r7017 r10421  
    77*  @author EAM, IfA
    88*
    9 *  @version $Revision: 1.1 $ $Name: not supported by cvs2svn $
    10 *  @date $Date: 2006-05-01 01:55:43 $
     9*  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
     10*  @date $Date: 2006-12-03 18:48:10 $
    1111*
    1212*  Copyright 2004-2005 Institute for Astronomy, University of Hawaii
     
    1919/// @{
    2020
    21 bool pmFPAviewWriteJPEG (const pmFPAview *view, pmFPAfile *file);
    22 bool pmFPAWriteJPEG (pmFPA *fpa, const pmFPAview *view, pmFPAfile *file);
    23 bool pmChipWriteJPEG (pmChip *chip, const pmFPAview *view, pmFPAfile *file);
    24 bool pmCellWriteJPEG (pmCell *cell, const pmFPAview *view, pmFPAfile *file);
    25 bool pmReadoutWriteJPEG (pmReadout *readout, const pmFPAview *view, pmFPAfile *file);
     21bool pmFPAviewWriteJPEG (const pmFPAview *view, pmFPAfile *file, pmConfig *config);
     22bool pmFPAWriteJPEG (pmFPA *fpa, const pmFPAview *view, pmFPAfile *file, pmConfig *config);
     23bool pmChipWriteJPEG (pmChip *chip, const pmFPAview *view, pmFPAfile *file, pmConfig *config);
     24bool pmCellWriteJPEG (pmCell *cell, const pmFPAview *view, pmFPAfile *file, pmConfig *config);
     25bool pmReadoutWriteJPEG (pmReadout *readout, const pmFPAview *view, pmFPAfile *file, pmConfig *config);
    2626
    2727# endif
  • trunk/psModules/src/camera/pmFPA_MANAPLOT.c

    r9585 r10421  
    55 *  @author EAM, IfA
    66 *
    7  *  @version $Revision: 1.1 $ $Name: not supported by cvs2svn $
    8  *  @date $Date: 2006-10-17 00:41:05 $
     7 *  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
     8 *  @date $Date: 2006-12-03 18:48:10 $
    99 *
    1010 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    3131
    3232
    33 bool pmFPAviewWriteMANAPLOT(const pmFPAview *view, pmFPAfile *file)
     33bool pmFPAviewWriteMANAPLOT(const pmFPAview *view, pmFPAfile *file, pmConfig *config)
    3434{
    3535    PS_ASSERT_PTR_NON_NULL(view, false);
     
    3939
    4040    if (view->chip == -1) {
    41         pmFPAWriteMANAPLOT (fpa, view, file);
     41        pmFPAWriteMANAPLOT (fpa, view, file, config);
    4242        return true;
    4343    }
     
    4949
    5050    if (view->cell == -1) {
    51         pmChipWriteMANAPLOT (chip, view, file);
     51        pmChipWriteMANAPLOT (chip, view, file, config);
    5252        return true;
    5353    }
     
    5959
    6060    if (view->readout == -1) {
    61         pmCellWriteMANAPLOT (cell, view, file);
     61        pmCellWriteMANAPLOT (cell, view, file, config);
    6262        return true;
    6363    }
     
    6868    pmReadout *readout = cell->readouts->data[view->readout];
    6969
    70     pmReadoutWriteMANAPLOT (readout, view, file);
     70    pmReadoutWriteMANAPLOT (readout, view, file, config);
    7171    return true;
    7272}
    7373
    7474// read in all chip-level MANAPLOT files for this FPA
    75 bool pmFPAWriteMANAPLOT (pmFPA *fpa, const pmFPAview *view, pmFPAfile *file)
     75bool pmFPAWriteMANAPLOT (pmFPA *fpa, const pmFPAview *view, pmFPAfile *file, pmConfig *config)
    7676{
    7777    PS_ASSERT_PTR_NON_NULL(fpa, false);
     
    8282
    8383        pmChip *chip = fpa->chips->data[i];
    84         pmChipWriteMANAPLOT (chip, view, file);
     84        pmChipWriteMANAPLOT (chip, view, file, config);
    8585    }
    8686    return true;
     
    8888
    8989// read in all cell-level MANAPLOT files for this chip
    90 bool pmChipWriteMANAPLOT (pmChip *chip, const pmFPAview *view, pmFPAfile *file)
     90bool pmChipWriteMANAPLOT (pmChip *chip, const pmFPAview *view, pmFPAfile *file, pmConfig *config)
    9191{
    9292    PS_ASSERT_PTR_NON_NULL(chip, false);
     
    9797
    9898        pmCell *cell = chip->cells->data[i];
    99         pmCellWriteMANAPLOT (cell, view, file);
     99        pmCellWriteMANAPLOT (cell, view, file, config);
    100100    }
    101101    return true;
     
    103103
    104104// read in all readout-level MANAPLOT files for this cell
    105 bool pmCellWriteMANAPLOT (pmCell *cell, const pmFPAview *view, pmFPAfile *file)
     105bool pmCellWriteMANAPLOT (pmCell *cell, const pmFPAview *view, pmFPAfile *file, pmConfig *config)
    106106{
    107107    PS_ASSERT_PTR_NON_NULL(cell, false);
     
    112112
    113113        pmReadout *readout = cell->readouts->data[i];
    114         pmReadoutWriteMANAPLOT (readout, view, file);
     114        pmReadoutWriteMANAPLOT (readout, view, file, config);
    115115    }
    116116    return true;
     
    118118
    119119// read in all readout-level Objects files for this cell
    120 bool pmReadoutWriteMANAPLOT (pmReadout *readout, const pmFPAview *view, pmFPAfile *file)
     120bool pmReadoutWriteMANAPLOT (pmReadout *readout, const pmFPAview *view, pmFPAfile *file, pmConfig *config)
    121121{
    122122    PS_ASSERT_PTR_NON_NULL(readout, false);
     
    136136    // output : filerule
    137137
    138     psString input = pmFPAfileNameFromRule (file->filextra, file, view);
    139     psString output = pmFPAfileNameFromRule (file->filerule, file, view);
    140     psString script = pmFPAfileNameFromRule (file->extname, file, view);
     138    psString tmpName;
     139    tmpName = pmFPAfileNameFromRule (file->filextra, file, view);
     140    psString input = pmConfigConvertFilename (tmpName, config);
     141    psFree (tmpName);
     142
     143    tmpName = pmFPAfileNameFromRule (file->filerule, file, view);
     144    psString output = pmConfigConvertFilename (tmpName, config);
     145    psFree (tmpName);
     146
     147    tmpName = pmFPAfileNameFromRule (file->extname, file, view);
     148    psString script = pmConfigConvertFilename (tmpName, config);
     149    psFree (tmpName);
    141150
    142151    psString line = NULL;
  • trunk/psModules/src/camera/pmFPA_MANAPLOT.h

    r9585 r10421  
    77*  @author EAM, IfA
    88*
    9 *  @version $Revision: 1.1 $ $Name: not supported by cvs2svn $
    10 *  @date $Date: 2006-10-17 00:41:05 $
     9*  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
     10*  @date $Date: 2006-12-03 18:48:10 $
    1111*
    1212*  Copyright 2004-2005 Institute for Astronomy, University of Hawaii
     
    1919/// @{
    2020
    21 bool pmFPAviewWriteMANAPLOT (const pmFPAview *view, pmFPAfile *file);
    22 bool pmFPAWriteMANAPLOT (pmFPA *fpa, const pmFPAview *view, pmFPAfile *file);
    23 bool pmChipWriteMANAPLOT (pmChip *chip, const pmFPAview *view, pmFPAfile *file);
    24 bool pmCellWriteMANAPLOT (pmCell *cell, const pmFPAview *view, pmFPAfile *file);
    25 bool pmReadoutWriteMANAPLOT (pmReadout *readout, const pmFPAview *view, pmFPAfile *file);
     21bool pmFPAviewWriteMANAPLOT (const pmFPAview *view, pmFPAfile *file, pmConfig *config);
     22bool pmFPAWriteMANAPLOT (pmFPA *fpa, const pmFPAview *view, pmFPAfile *file, pmConfig *config);
     23bool pmChipWriteMANAPLOT (pmChip *chip, const pmFPAview *view, pmFPAfile *file, pmConfig *config);
     24bool pmCellWriteMANAPLOT (pmCell *cell, const pmFPAview *view, pmFPAfile *file, pmConfig *config);
     25bool pmReadoutWriteMANAPLOT (pmReadout *readout, const pmFPAview *view, pmFPAfile *file, pmConfig *config);
    2626
    2727# endif
  • trunk/psModules/src/camera/pmFPAfileDefine.c

    r9950 r10421  
    277277    }
    278278
     279    psString realName = pmConfigConvertFilename (infiles->data[0], config);
     280    if (!realName) {
     281        psError(PS_ERR_IO, false, "Failed to convert file name %s\n", (char *) infiles->data[0]);
     282        return NULL;
     283    }
     284
    279285    // load the header of the first image
    280     fits = psFitsOpen (infiles->data[0], "r");
     286    fits = psFitsOpen (realName, "r");
     287    if (!fits) {
     288        psError(PS_ERR_IO, false, "Failed to open file %s\n", realName);
     289        psFree (realName);
     290        return NULL;
     291    }
    281292    phu = psFitsReadHeader (NULL, fits);
     293    if (!phu) {
     294        psError(PS_ERR_IO, false, "Failed to read file header %s\n", realName);
     295        psFree (realName);
     296        return NULL;
     297    }
    282298    psFitsClose (fits);
    283299
     
    286302    format = pmConfigCameraFormatFromHeader (config, phu);
    287303    if (!format) {
    288         psError(PS_ERR_IO, false, "Failed to read CCD format from %s\n", (char *)infiles->data[0]);
     304        psError(PS_ERR_IO, false, "Failed to read CCD format from %s\n", realName);
    289305        psFree(phu);
     306        psFree (realName);
    290307        return NULL;
    291308    }
     
    294311    fpa = pmFPAConstruct (config->camera);
    295312    if (!fpa) {
    296         psError(PS_ERR_IO, false, "Failed to construct FPA from %s", (char *)infiles->data[0]);
    297         return NULL;
    298     }
     313        psError(PS_ERR_IO, false, "Failed to construct FPA from %s", realName);
     314        psFree (realName);
     315        return NULL;
     316    }
     317    psFree (realName);
    299318
    300319    // load the given filerule (from config->camera) and bind it to the fpa
     
    337356    for (int i = 0; i < infiles->n; i++) {
    338357        if (i > 0) {
    339             fits = psFitsOpen (infiles->data[i], "r");
     358            psString realName = pmConfigConvertFilename (infiles->data[i], config);
     359            if (!realName) {
     360                psError(PS_ERR_IO, false, "Failed to convert file name %s", (char *) infiles->data[i]);
     361                return NULL;
     362            }
     363            fits = psFitsOpen (realName, "r");
     364            if (!fits) {
     365                psError(PS_ERR_IO, false, "Failed to open file %s\n", realName);
     366                psFree (realName);
     367                return NULL;
     368            }
    340369            phu = psFitsReadHeader (NULL, fits);
    341             pmConfigValidateCameraFormat (format, phu);
     370            if (!phu) {
     371                psError(PS_ERR_IO, false, "Failed to read file header %s", realName);
     372                psFree (realName);
     373                psFitsClose (fits);
     374                return NULL;
     375            }
     376            if (!pmConfigValidateCameraFormat (format, phu)) {
     377                psError(PS_ERR_IO, false, "file %s is not from the required camera", realName);
     378                psFree (realName);
     379                psFitsClose (fits);
     380                return NULL;
     381            }
    342382            psFitsClose (fits);
    343383        }
     
    545585
    546586    // Prepend the global path to the file rule
    547     if (config->workdir) {
    548         psStringPrepend(&file->filerule, "%s/", config->workdir);
    549     }
     587    psString tmpName = pmConfigConvertFilename (file->filerule, config);
     588    psFree (file->filerule);
     589    file->filerule = tmpName;
    550590
    551591    if (found) {
  • trunk/psModules/src/camera/pmFPAfileIO.c

    r10385 r10421  
    210210        }
    211211
    212         // XXXX this is very ad-hoc
    213         // XXXX prepend the value config[WORKDIR] to the filename...
    214         char *workdir = psMetadataLookupStr (NULL, config->site, "WORKDIR");
    215         if (workdir) {
    216             psStringPrepend (&file->filename, "%s/", workdir);
    217         }
    218 
    219212        psTrace ("pmFPAfile", 6, "got detrend file %s\n", file->filename);
    220213        psFree (extra);
    221214    }
    222     // if () "neb://" -> get from neb...
     215
     216    // apply filename mangling rules (file://, path://, neb://, WORKDIR)
     217    psString tmpName = pmConfigConvertFilename (file->filename, config);
     218    psFree (file->filename);
     219    file->filename = tmpName;
    223220
    224221    switch (file->type) {
     
    353350    case PM_FPA_FILE_CMP:
    354351    case PM_FPA_FILE_CMF:
    355         pmFPAviewReadObjects (view, file);
     352        pmFPAviewReadObjects (view, file, config);
    356353        psTrace ("pmFPAfile", 5, "reading %s (type: %d)\n", file->filename, file->type);
    357354        break;
    358355
    359356    case PM_FPA_FILE_PSF:
    360         pmFPAviewReadPSFmodel (view, file);
     357        pmFPAviewReadPSFmodel (view, file, config);
    361358        psTrace ("pmFPAfile", 5, "reading %s (type: %d)\n", file->filename, file->type);
    362359        break;
     
    508505    case PM_FPA_FILE_CMF:
    509506        psTrace ("pmFPAfile", 5, "writing object %s (fpa: %p)\n", file->filename, file->fpa);
    510         if (!pmFPAviewWriteObjects (view, file)) {
     507        if (!pmFPAviewWriteObjects (view, file, config)) {
    511508            psError(PS_ERR_IO, false, "Failed to write object %s", file->filename);
    512509            return false;
     
    516513
    517514    case PM_FPA_FILE_PSF:
    518         pmFPAviewWritePSFmodel (view, file);
     515        pmFPAviewWritePSFmodel (view, file, config);
    519516        psTrace ("pmFPAfile", 5, "wrote PSF %s (fpa: %p)\n", file->filename, file->fpa);
    520517        break;
    521518
    522519    case PM_FPA_FILE_JPEG:
    523         pmFPAviewWriteJPEG (view, file);
     520        pmFPAviewWriteJPEG (view, file, config);
    524521        psTrace ("pmFPAfile", 5, "wrote JPEG %s (fpa: %p)\n", file->filename, file->fpa);
    525522        break;
    526523
    527524    case PM_FPA_FILE_MANAPLOT:
    528         pmFPAviewWriteMANAPLOT (view, file);
     525        pmFPAviewWriteMANAPLOT (view, file, config);
    529526        psTrace ("pmFPAfile", 5, "wrote MANAPLOT %s (fpa: %p)\n", file->filename, file->fpa);
    530527        break;
  • trunk/psModules/src/config/pmConfig.c

    r9992 r10421  
    44 *  @author EAM (IfA)
    55 *
    6  *  @version $Revision: 1.54 $ $Name: not supported by cvs2svn $
    7  *  @date $Date: 2006-11-15 02:34:18 $
     6 *  @version $Revision: 1.55 $ $Name: not supported by cvs2svn $
     7 *  @date $Date: 2006-12-03 18:48:10 $
    88 *
    99 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    454454
    455455
     456// XXX aren't these (return false) below errors: call psError?
    456457bool pmConfigValidateCameraFormat(const psMetadata *cameraFormat, const psMetadata *header)
    457458{
     
    463464    psMetadata *rule = psMetadataLookupMetadata(&mdStatus, cameraFormat, "RULE");
    464465    if (! mdStatus || ! rule) {
    465         psLogMsg(__func__, PS_LOG_WARN, "Unable to read rule for camera.\n");
     466        psError(PS_ERR_UNKNOWN, true, "Unable to read rule for camera.\n");
    466467        return false;
    467468    }
     
    472473    while ((ruleItem = psMetadataGetAndIncrement(ruleIter))) {
    473474        // Check for the existence of the rule
    474         psMetadataItem *headerItem = psMetadataLookup((psMetadata*)header, ruleItem->name);
     475        psMetadataItem *headerItem = psMetadataLookup(header, ruleItem->name);
    475476        if (! headerItem) {
    476477            // It doesn't have a required header keyword, so it's not it
    477478            psFree(ruleIter);
    478             psTrace("psModules.config", 5, "Can't find %s\n", ruleItem->name);
     479            psError(PS_ERR_UNKNOWN, true, "Can't find %s\n", ruleItem->name);
    479480            return false;
    480481        }
     
    482483        // Check to see if the rule works
    483484        if (! psMetadataItemCompare(headerItem, ruleItem)) {
    484             psTrace("psModules.config", 5, "%s doesn't match.\n", ruleItem->name);
     485            psError(PS_ERR_UNKNOWN, true, "%s doesn't match.\n", ruleItem->name);
    485486            psFree(ruleIter);
    486487            return false;
     
    938939            glob (words->data[i], 0, NULL, &globList);
    939940
     941            // if the glob does not match, save the literal word:
     942            // otherwise save all glob matches
    940943            if (globList.gl_pathc == 0) {
    941                 psError(PS_ERR_IO, true, "No match for %s", (char *)words->data[i]);
    942                 return input;
    943             }
    944 
    945             for (int j = 0; j < globList.gl_pathc; j++) {
    946                 char *filename = psStringCopy (globList.gl_pathv[j]);
    947                 psArrayAdd (input, 16, filename);
    948                 psFree (filename);
     944                psArrayAdd (input, 16, words->data[i]);
     945            } else {
     946                for (int j = 0; j < globList.gl_pathc; j++) {
     947                    char *filename = psStringCopy (globList.gl_pathv[j]);
     948                    psArrayAdd (input, 16, filename);
     949                    psFree (filename);
     950                }
    949951            }
    950952        }
     
    10081010    return true;
    10091011}
     1012
     1013// convert the supplied name, create a new output psString
     1014psString pmConfigConvertFilename (char *filename, pmConfig *config)
     1015{
     1016
     1017    psString newName = psStringCopy (filename);
     1018
     1019    // strip file:// from front of name
     1020    if (!strncasecmp (newName, "file://", strlen("file://"))) {
     1021        newName = psStringSubstitute (newName, "", "file://");
     1022    }
     1023
     1024    // replace path://PATH with matched datapath
     1025    if (!strncasecmp (newName, "path://", strlen("path://"))) {
     1026        // filename should be of the form: path://PATH/rest/of/file
     1027        // replace PATH with matching name from config->site:DATAPATH
     1028        psMetadata *datapath = psMetadataLookupPtr (NULL, config->site, "DATAPATH");
     1029        if (datapath == NULL) {
     1030            psError(PS_ERR_UNKNOWN, true, "DATAPATH is not defined in config.site");
     1031            psFree (newName);
     1032            return NULL;
     1033        }
     1034
     1035        char *point = newName + strlen("path://");
     1036        char *mark = strchr (point, '/');
     1037        if (mark == NULL) {
     1038            psError(PS_ERR_UNKNOWN, true, "syntax error in PATH-style name %s", newName);
     1039            psFree (newName);
     1040            return false;
     1041        }
     1042
     1043        psString path = psStringNCopy (point, mark - point);
     1044        char *realpath = psMetadataLookupStr (NULL, datapath, path);
     1045        if (realpath == NULL) {
     1046            psError(PS_ERR_UNKNOWN, true, "path (%s) not defined in config.site:DATAPATH for PATH-style name %s", path, newName);
     1047            psFree (newName);
     1048            psFree (path);
     1049            return false;
     1050        }
     1051        psFree (path);
     1052
     1053        char *tmpName = NULL;
     1054        psStringAppend (&tmpName, "%s/%s", realpath, mark + 1);
     1055        psFree (newName);
     1056        newName = tmpName;
     1057    }
     1058
     1059    // substitute neb://name with matched nebulous name
     1060
     1061    // if we still have a relative path, prepend WORKDIR:
     1062    if (newName[0] != '/') {
     1063        char *workdir = psMetadataLookupStr (NULL, config->site, "WORKDIR");
     1064        if (workdir) {
     1065            psStringPrepend (&newName, "%s/", workdir);
     1066        }
     1067    }
     1068
     1069    return newName;
     1070}
  • trunk/psModules/src/config/pmConfig.h

    r9904 r10421  
    99/// @author Eugene Magnier, IfA
    1010///
    11 /// @version $Revision: 1.18 $ $Name: not supported by cvs2svn $
    12 /// @date $Date: 2006-11-08 02:10:07 $
     11/// @version $Revision: 1.19 $ $Name: not supported by cvs2svn $
     12/// @date $Date: 2006-12-03 18:48:10 $
    1313///
    1414/// Copyright 2005-2006 Institute for Astronomy, University of Hawaii
     
    161161                       );
    162162
     163// convert the supplied name, create a new output psString
     164psString pmConfigConvertFilename (char *filename, pmConfig *config);
    163165
    164166#endif
  • trunk/psModules/src/objects/pmPSF_IO.c

    r9770 r10421  
    66 *  @author EAM, IfA
    77 *
    8  *  @version $Revision: 1.8 $ $Name: not supported by cvs2svn $
    9  *  @date $Date: 2006-10-28 20:23:51 $
     8 *  @version $Revision: 1.9 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2006-12-03 18:48:10 $
    1010 *
    1111 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    117117}
    118118
    119 bool pmFPAviewWritePSFmodel (const pmFPAview *view, pmFPAfile *file)
     119bool pmFPAviewWritePSFmodel (const pmFPAview *view, pmFPAfile *file, pmConfig *config)
    120120{
    121121
     
    123123
    124124    if (view->chip == -1) {
    125         pmFPAWritePSFmodel (fpa, view, file);
     125        pmFPAWritePSFmodel (fpa, view, file, config);
    126126        return true;
    127127    }
     
    133133
    134134    if (view->cell == -1) {
    135         pmChipWritePSFmodel (chip, view, file);
     135        pmChipWritePSFmodel (chip, view, file, config);
    136136        return true;
    137137    }
     
    143143
    144144    if (view->readout == -1) {
    145         pmCellWritePSFmodel (cell, view, file);
     145        pmCellWritePSFmodel (cell, view, file, config);
    146146        return true;
    147147    }
     
    152152    pmReadout *readout = cell->readouts->data[view->readout];
    153153
    154     pmReadoutWritePSFmodel (readout, view, file);
     154    pmReadoutWritePSFmodel (readout, view, file, config);
    155155    return true;
    156156}
    157157
    158158// read in all chip-level PSFmodel files for this FPA
    159 bool pmFPAWritePSFmodel (pmFPA *fpa, const pmFPAview *view, pmFPAfile *file)
     159bool pmFPAWritePSFmodel (pmFPA *fpa, const pmFPAview *view, pmFPAfile *file, pmConfig *config)
    160160{
    161161
     
    163163
    164164        pmChip *chip = fpa->chips->data[i];
    165         pmChipWritePSFmodel (chip, view, file);
     165        pmChipWritePSFmodel (chip, view, file, config);
    166166    }
    167167    return true;
     
    169169
    170170// read in all cell-level PSFmodel files for this chip
    171 bool pmChipWritePSFmodel (pmChip *chip, const pmFPAview *view, pmFPAfile *file)
     171bool pmChipWritePSFmodel (pmChip *chip, const pmFPAview *view, pmFPAfile *file, pmConfig *config)
    172172{
    173173
     
    175175
    176176        pmCell *cell = chip->cells->data[i];
    177         pmCellWritePSFmodel (cell, view, file);
     177        pmCellWritePSFmodel (cell, view, file, config);
    178178    }
    179179    return true;
     
    181181
    182182// read in all readout-level PSFmodel files for this cell
    183 bool pmCellWritePSFmodel (pmCell *cell, const pmFPAview *view, pmFPAfile *file)
     183bool pmCellWritePSFmodel (pmCell *cell, const pmFPAview *view, pmFPAfile *file, pmConfig *config)
    184184{
    185185
     
    187187
    188188        pmReadout *readout = cell->readouts->data[i];
    189         pmReadoutWritePSFmodel (readout, view, file);
     189        pmReadoutWritePSFmodel (readout, view, file, config);
    190190    }
    191191    return true;
     
    193193
    194194// read in all readout-level Objects files for this cell
    195 bool pmReadoutWritePSFmodel (pmReadout *readout, const pmFPAview *view, pmFPAfile *file)
     195bool pmReadoutWritePSFmodel (pmReadout *readout, const pmFPAview *view, pmFPAfile *file, pmConfig *config)
    196196{
    197197    bool status;
    198198    char *filename;
     199    char *realname;
    199200
    200201    pmPSF *psf = psMetadataLookupPtr (&status, readout->analysis, "PSPHOT.PSF");
     
    203204    case PM_FPA_FILE_PSF:
    204205        filename = pmFPAfileNameFromRule (file->filerule, file, view);
     206        realname = pmConfigConvertFilename (filename, config);
     207
    205208        psMetadata *psfData = pmPSFtoMetadata (NULL, psf);
    206         psMetadataConfigWrite (psfData, filename);
     209        psMetadataConfigWrite (psfData, realname);
    207210        psFree (psfData);
     211        psFree (realname);
    208212        psFree (filename);
    209213        return true;
     
    218222
    219223
    220 bool pmFPAviewReadPSFmodel (const pmFPAview *view, pmFPAfile *file)
     224bool pmFPAviewReadPSFmodel (const pmFPAview *view, pmFPAfile *file, pmConfig *config)
    221225{
    222226
     
    224228
    225229    if (view->chip == -1) {
    226         pmFPAReadPSFmodel (fpa, view, file);
     230        pmFPAReadPSFmodel (fpa, view, file, config);
    227231        return true;
    228232    }
     
    234238
    235239    if (view->cell == -1) {
    236         pmChipReadPSFmodel (chip, view, file);
     240        pmChipReadPSFmodel (chip, view, file, config);
    237241        return true;
    238242    }
     
    244248
    245249    if (view->readout == -1) {
    246         pmCellReadPSFmodel (cell, view, file);
     250        pmCellReadPSFmodel (cell, view, file, config);
    247251        return true;
    248252    }
     
    253257    pmReadout *readout = cell->readouts->data[view->readout];
    254258
    255     pmReadoutReadPSFmodel (readout, view, file);
     259    pmReadoutReadPSFmodel (readout, view, file, config);
    256260    return true;
    257261}
    258262
    259263// read in all chip-level PSFmodel files for this FPA
    260 bool pmFPAReadPSFmodel (pmFPA *fpa, const pmFPAview *view, pmFPAfile *file)
     264bool pmFPAReadPSFmodel (pmFPA *fpa, const pmFPAview *view, pmFPAfile *file, pmConfig *config)
    261265{
    262266
     
    264268
    265269        pmChip *chip = fpa->chips->data[i];
    266         pmChipReadPSFmodel (chip, view, file);
     270        pmChipReadPSFmodel (chip, view, file, config);
    267271    }
    268272    return true;
     
    270274
    271275// read in all cell-level PSFmodel files for this chip
    272 bool pmChipReadPSFmodel (pmChip *chip, const pmFPAview *view, pmFPAfile *file)
     276bool pmChipReadPSFmodel (pmChip *chip, const pmFPAview *view, pmFPAfile *file, pmConfig *config)
    273277{
    274278
     
    276280
    277281        pmCell *cell = chip->cells->data[i];
    278         pmCellReadPSFmodel (cell, view, file);
     282        pmCellReadPSFmodel (cell, view, file, config);
    279283    }
    280284    return true;
     
    282286
    283287// read in all readout-level PSFmodel files for this cell
    284 bool pmCellReadPSFmodel (pmCell *cell, const pmFPAview *view, pmFPAfile *file)
     288bool pmCellReadPSFmodel (pmCell *cell, const pmFPAview *view, pmFPAfile *file, pmConfig *config)
    285289{
    286290
     
    288292
    289293        pmReadout *readout = cell->readouts->data[i];
    290         pmReadoutReadPSFmodel (readout, view, file);
     294        pmReadoutReadPSFmodel (readout, view, file, config);
    291295    }
    292296    return true;
     
    294298
    295299// read in all readout-level Objects files for this cell
    296 bool pmReadoutReadPSFmodel (pmReadout *readout, const pmFPAview *view, pmFPAfile *file)
     300bool pmReadoutReadPSFmodel (pmReadout *readout, const pmFPAview *view, pmFPAfile *file, pmConfig *config)
    297301{
    298302
    299303    unsigned int Nfail;
    300304    char *filename;
     305    char *realname;
    301306
    302307    switch (file->type) {
    303308    case PM_FPA_FILE_PSF:
    304309        filename = pmFPAfileNameFromRule (file->filerule, file, view);
    305 
    306         psMetadata *psfData = psMetadataConfigRead(NULL, &Nfail, filename, FALSE);
     310        realname = pmConfigConvertFilename (filename, config);
     311
     312        psMetadata *psfData = psMetadataConfigRead(NULL, &Nfail, realname, FALSE);
    307313        pmPSF *psf = pmPSFfromMetadata (psfData);
    308314        psMetadataAdd (readout->analysis, PS_LIST_TAIL, "PSPHOT.PSF", PS_DATA_UNKNOWN, "psphot psf", psf);
     
    310316        psFree (psf);
    311317        psFree (psfData);
     318        psFree (realname);
    312319        psFree (filename);
    313320
  • trunk/psModules/src/objects/pmPSF_IO.h

    r9539 r10421  
    66 *  @author EAM, IfA
    77 *
    8  *  @version $Revision: 1.3 $ $Name: not supported by cvs2svn $
    9  *  @date $Date: 2006-10-13 21:15:45 $
     8 *  @version $Revision: 1.4 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2006-12-03 18:48:10 $
    1010 *
    1111 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    1818psMetadata *pmPSFtoMetadata (psMetadata *metadata, pmPSF *psf);
    1919pmPSF *pmPSFfromMetadata (psMetadata *metadata);
    20 bool pmFPAviewWritePSFmodel (const pmFPAview *view, pmFPAfile *file);
    21 bool pmFPAWritePSFmodel (pmFPA *fpa, const pmFPAview *view, pmFPAfile *file);
    22 bool pmChipWritePSFmodel (pmChip *chip, const pmFPAview *view, pmFPAfile *file);
    23 bool pmCellWritePSFmodel (pmCell *cell, const pmFPAview *view, pmFPAfile *file);
    24 bool pmReadoutWritePSFmodel (pmReadout *readout, const pmFPAview *view, pmFPAfile *file);
     20bool pmFPAviewWritePSFmodel (const pmFPAview *view, pmFPAfile *file, pmConfig *config);
     21bool pmFPAWritePSFmodel (pmFPA *fpa, const pmFPAview *view, pmFPAfile *file, pmConfig *config);
     22bool pmChipWritePSFmodel (pmChip *chip, const pmFPAview *view, pmFPAfile *file, pmConfig *config);
     23bool pmCellWritePSFmodel (pmCell *cell, const pmFPAview *view, pmFPAfile *file, pmConfig *config);
     24bool pmReadoutWritePSFmodel (pmReadout *readout, const pmFPAview *view, pmFPAfile *file, pmConfig *config);
    2525
    26 bool pmFPAviewReadPSFmodel (const pmFPAview *view, pmFPAfile *file);
    27 bool pmFPAReadPSFmodel (pmFPA *fpa, const pmFPAview *view, pmFPAfile *file);
    28 bool pmChipReadPSFmodel (pmChip *chip, const pmFPAview *view, pmFPAfile *file);
    29 bool pmCellReadPSFmodel (pmCell *cell, const pmFPAview *view, pmFPAfile *file);
    30 bool pmReadoutReadPSFmodel (pmReadout *readout, const pmFPAview *view, pmFPAfile *file);
     26bool pmFPAviewReadPSFmodel (const pmFPAview *view, pmFPAfile *file, pmConfig *config);
     27bool pmFPAReadPSFmodel (pmFPA *fpa, const pmFPAview *view, pmFPAfile *file, pmConfig *config);
     28bool pmChipReadPSFmodel (pmChip *chip, const pmFPAview *view, pmFPAfile *file, pmConfig *config);
     29bool pmCellReadPSFmodel (pmCell *cell, const pmFPAview *view, pmFPAfile *file, pmConfig *config);
     30bool pmReadoutReadPSFmodel (pmReadout *readout, const pmFPAview *view, pmFPAfile *file, pmConfig *config);
    3131
    3232# endif
  • trunk/psModules/src/objects/pmSourceIO.c

    r9560 r10421  
    33 *  @author EAM, IfA
    44 *
    5  *  @version $Revision: 1.13 $ $Name: not supported by cvs2svn $
    6  *  @date $Date: 2006-10-14 00:53:56 $
     5 *  @version $Revision: 1.14 $ $Name: not supported by cvs2svn $
     6 *  @date $Date: 2006-12-03 18:48:10 $
    77 *
    88 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    6060
    6161// Given a FITS file pointer, write the table of object data
    62 bool pmFPAviewWriteObjects (const pmFPAview *view, pmFPAfile *file)
     62bool pmFPAviewWriteObjects (const pmFPAview *view, pmFPAfile *file, pmConfig *config)
    6363{
    6464
     
    6666
    6767    if (view->chip == -1) {
    68         if (!pmFPAWriteObjects (fpa, view, file)) {
     68        if (!pmFPAWriteObjects (fpa, view, file, config)) {
    6969            psError(PS_ERR_IO, false, "Failed to write objects from fpa");
    7070            return false;
     
    8080
    8181    if (view->cell == -1) {
    82         if (!pmChipWriteObjects (chip, view, file)) {
     82        if (!pmChipWriteObjects (chip, view, file, config)) {
    8383            psError(PS_ERR_IO, false, "Failed to write objects from chip");
    8484            return false;
     
    9595
    9696    if (view->readout == -1) {
    97         if (!pmCellWriteObjects (cell, view, file)) {
     97        if (!pmCellWriteObjects (cell, view, file, config)) {
    9898            psError(PS_ERR_IO, false, "Failed to write objects from cell");
    9999            return false;
     
    110110    pmReadout *readout = cell->readouts->data[view->readout];
    111111
    112     if (!pmReadoutWriteObjects (readout, view, file)) {
     112    if (!pmReadoutWriteObjects (readout, view, file, config)) {
    113113        psError(PS_ERR_IO, false, "Failed to write objects from readout %d", view->readout);
    114114        return false;
     
    119119
    120120// read in all chip-level Objects files for this FPA
    121 bool pmFPAWriteObjects (pmFPA *fpa, const pmFPAview *view, pmFPAfile *file)
     121bool pmFPAWriteObjects (pmFPA *fpa, const pmFPAview *view, pmFPAfile *file, pmConfig *config)
    122122{
    123123
     
    125125
    126126        pmChip *chip = fpa->chips->data[i];
    127         if (!pmChipWriteObjects (chip, view, file)) {
     127        if (!pmChipWriteObjects (chip, view, file, config)) {
    128128            psError(PS_ERR_IO, false, "Failed to write %dth chip", i);
    129129            return false;
     
    134134
    135135// read in all cell-level Objects files for this chip
    136 bool pmChipWriteObjects (pmChip *chip, const pmFPAview *view, pmFPAfile *file)
     136bool pmChipWriteObjects (pmChip *chip, const pmFPAview *view, pmFPAfile *file, pmConfig *config)
    137137{
    138138
     
    140140
    141141        pmCell *cell = chip->cells->data[i];
    142         if (!pmCellWriteObjects (cell, view, file)) {
     142        if (!pmCellWriteObjects (cell, view, file, config)) {
    143143            psError(PS_ERR_IO, false, "Failed to write %dth cell", i);
    144144            return false;
     
    149149
    150150// read in all readout-level Objects files for this cell
    151 bool pmCellWriteObjects (pmCell *cell, const pmFPAview *view, pmFPAfile *file)
     151bool pmCellWriteObjects (pmCell *cell, const pmFPAview *view, pmFPAfile *file, pmConfig *config)
    152152{
    153153
     
    155155
    156156        pmReadout *readout = cell->readouts->data[i];
    157         if (!pmReadoutWriteObjects (readout, view, file)) {
     157        if (!pmReadoutWriteObjects (readout, view, file, config)) {
    158158            psError(PS_ERR_IO, false, "Failed to write %dth readout", i);
    159159            return false;
     
    164164
    165165// read in all readout-level Objects files for this cell
    166 bool pmReadoutWriteObjects (pmReadout *readout, const pmFPAview *view, pmFPAfile *file)
     166bool pmReadoutWriteObjects (pmReadout *readout, const pmFPAview *view, pmFPAfile *file, pmConfig *config)
    167167{
    168168
    169169    bool status;
     170    char *realname;
    170171    char *filename;
    171172    char *dataname;
     
    183184    case PM_FPA_FILE_RAW:
    184185        filename = pmFPAfileNameFromRule (file->filerule, file, view);
    185         pmSourcesWriteRAW (sources, filename);
     186        realname = pmConfigConvertFilename (filename, config);
     187        pmSourcesWriteRAW (sources, realname);
     188        psFree (realname);
    186189        psFree (filename);
    187190        break;
     
    189192    case PM_FPA_FILE_OBJ:
    190193        filename = pmFPAfileNameFromRule (file->filerule, file, view);
    191         pmSourcesWriteOBJ (sources, filename);
     194        realname = pmConfigConvertFilename (filename, config);
     195        pmSourcesWriteOBJ (sources, realname);
     196        psFree (realname);
    192197        psFree (filename);
    193198        break;
     
    195200    case PM_FPA_FILE_SX:
    196201        filename = pmFPAfileNameFromRule (file->filerule, file, view);
    197         pmSourcesWriteSX (sources, filename);
     202        realname = pmConfigConvertFilename (filename, config);
     203        pmSourcesWriteSX (sources, realname);
     204        psFree (realname);
    198205        psFree (filename);
    199206        break;
     
    203210        hdu = pmFPAviewThisHDU (view, file->fpa);
    204211        filename = pmFPAfileNameFromRule (file->filerule, file, view);
     212        realname = pmConfigConvertFilename (filename, config);
    205213
    206214        // copy the header to an output header, add the output header data
     
    219227        }
    220228
    221         bool status = pmSourcesWriteCMP (sources, filename, outhead);
     229        bool status = pmSourcesWriteCMP (sources, realname, outhead);
    222230        psFree (outhead);
     231        psFree (realname);
    223232        psFree (filename);
    224233
     
    310319
    311320// Given a FITS file pointer, read the table of object data
    312 bool pmFPAviewReadObjects (const pmFPAview *view, pmFPAfile *file)
     321bool pmFPAviewReadObjects (const pmFPAview *view, pmFPAfile *file, pmConfig *config)
    313322{
    314323    pmFPA *fpa = file->fpa;
    315324
    316325    if (view->chip == -1) {
    317         pmFPAReadObjects (fpa, view, file);
     326        pmFPAReadObjects (fpa, view, file, config);
    318327        return true;
    319328    }
     
    325334
    326335    if (view->cell == -1) {
    327         pmChipReadObjects (chip, view, file);
     336        pmChipReadObjects (chip, view, file, config);
    328337        return true;
    329338    }
     
    335344
    336345    if (view->readout == -1) {
    337         pmCellReadObjects (cell, view, file);
     346        pmCellReadObjects (cell, view, file, config);
    338347        return true;
    339348    }
     
    344353    pmReadout *readout = cell->readouts->data[view->readout];
    345354
    346     pmReadoutReadObjects (readout, view, file);
     355    pmReadoutReadObjects (readout, view, file, config);
    347356    return true;
    348357}
    349358
    350359// read in all chip-level Objects files for this FPA
    351 bool pmFPAReadObjects (pmFPA *fpa, const pmFPAview *view, pmFPAfile *file)
     360bool pmFPAReadObjects (pmFPA *fpa, const pmFPAview *view, pmFPAfile *file, pmConfig *config)
    352361{
    353362    for (int i = 0; i < fpa->chips->n; i++) {
    354363        pmChip *chip = fpa->chips->data[i];
    355         pmChipReadObjects (chip, view, file);
     364        pmChipReadObjects (chip, view, file, config);
    356365    }
    357366    return true;
     
    359368
    360369// read in all cell-level Objects files for this chip
    361 bool pmChipReadObjects (pmChip *chip, const pmFPAview *view, pmFPAfile *file)
     370bool pmChipReadObjects (pmChip *chip, const pmFPAview *view, pmFPAfile *file, pmConfig *config)
    362371{
    363372    for (int i = 0; i < chip->cells->n; i++) {
    364373        pmCell *cell = chip->cells->data[i];
    365         pmCellReadObjects (cell, view, file);
     374        pmCellReadObjects (cell, view, file, config);
    366375    }
    367376    return true;
     
    369378
    370379// read in all readout-level Objects files for this cell
    371 bool pmCellReadObjects (pmCell *cell, const pmFPAview *view, pmFPAfile *file)
     380bool pmCellReadObjects (pmCell *cell, const pmFPAview *view, pmFPAfile *file, pmConfig *config)
    372381{
    373382    // determine the number of readouts:
     
    384393    for (int i = 0; i < cell->readouts->n; i++) {
    385394        pmReadout *readout = cell->readouts->data[i];
    386         pmReadoutReadObjects (readout, view, file);
     395        pmReadoutReadObjects (readout, view, file, config);
    387396        cell->data_exists = true;
    388397    }
     
    391400
    392401// read in all readout-level Objects files for this cell
    393 bool pmReadoutReadObjects (pmReadout *readout, const pmFPAview *view, pmFPAfile *file)
     402bool pmReadoutReadObjects (pmReadout *readout, const pmFPAview *view, pmFPAfile *file, pmConfig *config)
    394403{
    395404
     
    427436            psMemIncrRefCounter (file->filename);
    428437        }
    429         file->fits = psFitsOpen (file->filename, "r");
     438
     439        psString realname = pmConfigConvertFilename (file->filename, config);
     440
     441        file->fits = psFitsOpen (realname, "r");
    430442        if (hdu->header != NULL) {
    431443            psFree (hdu->header);
     
    435447        file->fits = NULL;
    436448
    437         sources = pmSourcesReadCMP (file->filename, hdu->header);
     449        sources = pmSourcesReadCMP (realname, hdu->header);
     450        psFree (realname);
    438451        break;
    439452
  • trunk/psModules/src/objects/pmSourceIO.h

    r10182 r10421  
    33 *  @author EAM, IfA; GLG, MHPCC
    44 *
    5  *  @version $Revision: 1.3 $ $Name: not supported by cvs2svn $
    6  *  @date $Date: 2006-11-24 20:57:26 $
     5 *  @version $Revision: 1.4 $ $Name: not supported by cvs2svn $
     6 *  @date $Date: 2006-12-03 18:48:10 $
    77 *
    88 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    3030bool pmPeaksWriteText (psArray *peaks, char *filename);
    3131
    32 bool pmFPAviewReadObjects (const pmFPAview *view, pmFPAfile *file);
    33 bool pmFPAReadObjects (pmFPA *fpa, const pmFPAview *view, pmFPAfile *file);
    34 bool pmChipReadObjects (pmChip *chip, const pmFPAview *view, pmFPAfile *file);
    35 bool pmCellReadObjects (pmCell *cell, const pmFPAview *view, pmFPAfile *file);
    36 bool pmReadoutReadObjects (pmReadout *readout, const pmFPAview *view, pmFPAfile *file);
     32bool pmFPAviewReadObjects (const pmFPAview *view, pmFPAfile *file, pmConfig *config);
     33bool pmFPAReadObjects (pmFPA *fpa, const pmFPAview *view, pmFPAfile *file, pmConfig *config);
     34bool pmChipReadObjects (pmChip *chip, const pmFPAview *view, pmFPAfile *file, pmConfig *config);
     35bool pmCellReadObjects (pmCell *cell, const pmFPAview *view, pmFPAfile *file, pmConfig *config);
     36bool pmReadoutReadObjects (pmReadout *readout, const pmFPAview *view, pmFPAfile *file, pmConfig *config);
    3737
    38 bool pmFPAviewWriteObjects (const pmFPAview *view, pmFPAfile *file);
    39 bool pmFPAWriteObjects (pmFPA *fpa, const pmFPAview *view, pmFPAfile *file);
    40 bool pmChipWriteObjects (pmChip *chip, const pmFPAview *view, pmFPAfile *file);
    41 bool pmCellWriteObjects (pmCell *cell, const pmFPAview *view, pmFPAfile *file);
    42 bool pmReadoutWriteObjects (pmReadout *readout, const pmFPAview *view, pmFPAfile *file);
     38bool pmFPAviewWriteObjects (const pmFPAview *view, pmFPAfile *file, pmConfig *config);
     39bool pmFPAWriteObjects (pmFPA *fpa, const pmFPAview *view, pmFPAfile *file, pmConfig *config);
     40bool pmChipWriteObjects (pmChip *chip, const pmFPAview *view, pmFPAfile *file, pmConfig *config);
     41bool pmCellWriteObjects (pmCell *cell, const pmFPAview *view, pmFPAfile *file, pmConfig *config);
     42bool pmReadoutWriteObjects (pmReadout *readout, const pmFPAview *view, pmFPAfile *file, pmConfig *config);
    4343
    4444# endif /* PM_SOURCE_IO_H */
  • trunk/psModules/src/objects/pmSourceIO_RAW.c

    r10182 r10421  
    33 *  @author EAM, IfA
    44 *
    5  *  @version $Revision: 1.11 $ $Name: not supported by cvs2svn $
    6  *  @date $Date: 2006-11-24 20:57:26 $
     5 *  @version $Revision: 1.12 $ $Name: not supported by cvs2svn $
     6 *  @date $Date: 2006-12-03 18:48:10 $
    77 *
    88 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    6767    f = fopen (filename, "w");
    6868    if (f == NULL) {
    69         psLogMsg (__func__, 3, "can't open output file for PSFs: %s\n", filename);
     69        psLogMsg (__func__, 3, "can't open output file for PSF sources: %s\n", filename);
    7070        return false;
    7171    }
     
    126126    f = fopen (filename, "w");
    127127    if (f == NULL) {
    128         psLogMsg ("pmModelWriteEXTs", 3, "can't open output file for moments%s\n", filename);
     128        psLogMsg ("pmModelWriteEXTs", 3, "can't open output file for EXT sources: %s\n", filename);
    129129        return false;
    130130    }
     
    185185    f = fopen (filename, "w");
    186186    if (f == NULL) {
    187         psLogMsg ("DumpObjects", 3, "can't open output file for moments%s\n", filename);
     187        psLogMsg ("DumpObjects", 3, "can't open output file for NULL sources: %s\n", filename);
    188188        return false;
    189189    }
     
    230230    f = fopen (filename, "w");
    231231    if (f == NULL) {
    232         psLogMsg ("pmMomentsWriteText", 3, "can't open output file for moments%s\n", filename);
     232        psLogMsg ("pmMomentsWriteText", 3, "can't open output file for moments: %s\n", filename);
    233233        return false;
    234234    }
Note: See TracChangeset for help on using the changeset viewer.