IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Dec 8, 2005, 4:39:17 PM (21 years ago)
Author:
eugene
Message:

updated to use psFitsAlloc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psphot/src/psphotSetup.c

    r5672 r5754  
    2727    char *input = psMetadataLookupPtr (&status, config, "IMAGE");
    2828    if (!status) psAbort ("psphot", "input image not specified");
    29     psFits *file = psFitsAlloc (input);
     29    psFits *file = psFitsOpen (input, "r");
    3030    header = psFitsReadHeader (header, file);
    3131    psImage *tmpimage = psFitsReadImage (NULL, file, region, 0);
    3232    image = psImageCopy (NULL, tmpimage, PS_TYPE_F32);
    33     psFree (file);
     33    psFitsClose (file);
    3434   
    3535    // psFree (input);
     
    4646    char *weightName = psMetadataLookupPtr (&status, config, "WEIGHT");
    4747    if (status == true) {
    48         file = psFitsAlloc (weightName);
     48        file = psFitsOpen (weightName, "r");
    4949        weight = psFitsReadImage  (NULL, file, region, 0);
    50         psFree (file);
     50        psFitsClose (file);
    5151        // psFree (weightName); XXX - see psFree (input)
    5252    } else {
     
    6464    if (status == true) {
    6565        // XXX EAM require / convert mask to psU8?
    66         file = psFitsAlloc (maskName);
     66        file = psFitsOpen (maskName, "r");
    6767        mask  = psFitsReadImage  (NULL, file, region, 0);
    68         psFree (file);
     68        psFitsClose (file);
    6969        // psFree (maskName); XXX - see psFree (input)
    7070    } else {
Note: See TracChangeset for help on using the changeset viewer.