- Timestamp:
- Jan 28, 2009, 2:33:51 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/pap_branch_20090128/psModules/src/camera/pmFPAfileIO.c
r20937 r21211 173 173 status = pmFPAviewReadFitsMask(view, file, config); 174 174 break; 175 case PM_FPA_FILE_ WEIGHT:176 status = pmFPAviewReadFits Weight(view, file, config);175 case PM_FPA_FILE_VARIANCE: 176 status = pmFPAviewReadFitsVariance(view, file, config); 177 177 break; 178 178 case PM_FPA_FILE_HEADER: … … 262 262 case PM_FPA_FILE_IMAGE: 263 263 case PM_FPA_FILE_MASK: 264 case PM_FPA_FILE_ WEIGHT:264 case PM_FPA_FILE_VARIANCE: 265 265 case PM_FPA_FILE_FRINGE: 266 266 case PM_FPA_FILE_DARK: { … … 427 427 status = pmFPAviewWriteFitsMask(view, file, config); 428 428 break; 429 case PM_FPA_FILE_ WEIGHT:430 status = pmFPAviewWriteFits Weight(view, file, config);429 case PM_FPA_FILE_VARIANCE: 430 status = pmFPAviewWriteFitsVariance(view, file, config); 431 431 break; 432 432 case PM_FPA_FILE_HEADER: … … 524 524 case PM_FPA_FILE_IMAGE: 525 525 case PM_FPA_FILE_MASK: 526 case PM_FPA_FILE_ WEIGHT:526 case PM_FPA_FILE_VARIANCE: 527 527 case PM_FPA_FILE_HEADER: 528 528 case PM_FPA_FILE_FRINGE: … … 589 589 case PM_FPA_FILE_IMAGE: 590 590 case PM_FPA_FILE_MASK: 591 case PM_FPA_FILE_ WEIGHT:591 case PM_FPA_FILE_VARIANCE: 592 592 case PM_FPA_FILE_HEADER: 593 593 case PM_FPA_FILE_FRINGE: … … 730 730 psString tmpName = pmConfigConvertFilename (file->filename, config, create, false); 731 731 if (!tmpName) { 732 psError(PS_ERR_IO, false, "failed to determine real name from template for %s\n", file->filename);733 return false;732 psError(PS_ERR_IO, false, "failed to determine real name from template for %s\n", file->filename); 733 return false; 734 734 } 735 735 psFree (file->filename); … … 740 740 case PM_FPA_FILE_IMAGE: 741 741 case PM_FPA_FILE_MASK: 742 case PM_FPA_FILE_ WEIGHT:742 case PM_FPA_FILE_VARIANCE: 743 743 case PM_FPA_FILE_HEADER: 744 744 case PM_FPA_FILE_FRINGE: … … 783 783 // determine camera if not specified already 784 784 // XXX can I actually reach this with camera not specified?? 785 psMetadata *camera = NULL;786 psString formatName = NULL;787 psString cameraName = NULL;785 psMetadata *camera = NULL; 786 psString formatName = NULL; 787 psString cameraName = NULL; 788 788 file->format = pmConfigCameraFormatFromHeader (&camera, &cameraName, &formatName, config, phu, true); 789 789 if (!file->format) { … … 794 794 psFree(phu); 795 795 796 pmFPA *newFPA = pmFPAConstruct (camera, formatName);797 if (!newFPA) {798 psError(PS_ERR_IO, false, "Failed to construct FPA from %s for %s", file->filename, formatName);799 psFree(camera);800 psFree(formatName);801 return NULL;802 }803 psFree(camera);804 psFree(formatName);805 psFree(cameraName);806 807 // XXX this is really dangerous...808 psFree (file->fpa);809 file->fpa = newFPA;796 pmFPA *newFPA = pmFPAConstruct (camera, formatName); 797 if (!newFPA) { 798 psError(PS_ERR_IO, false, "Failed to construct FPA from %s for %s", file->filename, formatName); 799 psFree(camera); 800 psFree(formatName); 801 return NULL; 802 } 803 psFree(camera); 804 psFree(formatName); 805 psFree(cameraName); 806 807 // XXX this is really dangerous... 808 psFree (file->fpa); 809 file->fpa = newFPA; 810 810 } 811 811 … … 938 938 case PM_FPA_FILE_IMAGE: 939 939 case PM_FPA_FILE_MASK: 940 case PM_FPA_FILE_ WEIGHT:940 case PM_FPA_FILE_VARIANCE: 941 941 case PM_FPA_FILE_DARK: 942 942 case PM_FPA_FILE_FRINGE:
Note:
See TracChangeset
for help on using the changeset viewer.
