IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jan 23, 2007, 5:11:19 PM (19 years ago)
Author:
Paul Price
Message:

Enabling different formats for output pmFPAfiles. To do this, needed to overhaul the writing functions to generate a new FPA using the new format, and write that. To get the blank PHU, needed to do similarly for the open function (!), since it writes blanks immediately after opening the file. Tested with inputting 6 megacam split chips and writing to spliced format --- works successfully.

File:
1 edited

Legend:

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

    r11242 r11255  
    108108    }
    109109    if (file->mode == PM_FPA_MODE_WRITE) {
     110        // Want to write out any potential blank
     111        pmFPA *fpa = pmFPAfileSuitableFPA(file, view);
     112
    110113        switch (file->fileLevel) {
    111114        case PM_FPA_LEVEL_FPA:
    112             pmFPAWrite (file->fpa, file->fits, NULL, true, false);
     115            pmFPAWrite(fpa, file->fits, NULL, true, false);
    113116            break;
    114117        case PM_FPA_LEVEL_CHIP: {
    115                 pmChip *chip = pmFPAviewThisChip(view, file->fpa);
    116                 pmChipWrite (chip, file->fits, NULL, true, false);
     118                pmChip *chip = pmFPAviewThisChip(view, fpa);
     119                pmChipWrite(chip, file->fits, NULL, true, false);
    117120                break;
    118121            }
    119122        case PM_FPA_LEVEL_CELL: {
    120                 pmCell *cell = pmFPAviewThisCell(view, file->fpa);
     123                pmCell *cell = pmFPAviewThisCell(view, fpa);
    121124                pmCellWrite(cell, file->fits, NULL, true);
    122125                break;
     
    126129            break;
    127130        }
     131
     132        psFree(fpa);
    128133    }
    129134
     
    152157        return true;
    153158    }
     159
     160    #if 0
     161    // do we need to open this file?
     162    if (level != file->fileLevel) {
     163        psTrace("psModules.camera", 6, "skip open of %s at this level %s: fileLevel is %s",
     164                file->name, pmFPALevelToName(level), pmFPALevelToName(file->fileLevel));
     165        return true;
     166    }
     167    #endif
    154168
    155169    if (file->mode == PM_FPA_MODE_NONE) {
     
    755769        switch (place) {
    756770        case PM_FPA_BEFORE:
     771            #if 0
     772
     773            if (!pmFPAfileOpen(file, view, config)) {
     774                psError(PS_ERR_IO, false, "failed OPEN in FPA_BEFORE block for %s", file->name);
     775                goto failure;
     776            }
     777            #endif
    757778            if (!pmFPAfileRead (file, view, config)) {
    758779                psError(PS_ERR_IO, false, "failed READ in FPA_BEFORE block for %s", file->name);
Note: See TracChangeset for help on using the changeset viewer.