IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 24, 2010, 2:59:09 PM (16 years ago)
Author:
Paul Price
Message:

Merging trunk in advance of reintegrating into trunk.

Location:
branches/pap
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/pap

  • branches/pap/ppSkycell/src/ppSkycellLoop.c

    r24005 r28484  
    284284        pmFPAfileActivate(data->config->files, true, "PPSKYCELL.JPEG1");
    285285        pmFPAfileActivate(data->config->files, true, "PPSKYCELL.JPEG2");
     286        if (data->doFits) {
     287          pmFPAfileActivate(data->config->files, true, "PPSKYCELL.BIN1");
     288          pmFPAfileActivate(data->config->files, true, "PPSKYCELL.BIN2");
     289        }
     290       
    286291        pmFPAview *view = filesIterateDown(data->config); // View to readout
    287292
     293       
    288294        pmCell *cell1 = pmFPAfileThisCell(data->config->files, view, "PPSKYCELL.JPEG1"); // Rebinned cell 1
    289295        pmCell *cell2 = pmFPAfileThisCell(data->config->files, view, "PPSKYCELL.JPEG2"); // Rebinned cell 2
    290         psFree(view);
     296
    291297        pmReadout *ro1 = pmReadoutAlloc(cell1), *ro2 = pmReadoutAlloc(cell2); // Binned readouts
    292298
     
    298304        ro1->data_exists = cell1->data_exists = cell1->parent->data_exists = true;
    299305        ro2->data_exists = cell2->data_exists = cell2->parent->data_exists = true;
    300 
     306       
    301307        pmFPAfile *file1 = pmFPAfileSelectSingle(data->config->files, "PPSKYCELL.JPEG1", 0);
    302308        file1->save = true;
    303         file1->index = i;
     309        file1->fileIndex = i;
    304310        pmFPAfile *file2 = pmFPAfileSelectSingle(data->config->files, "PPSKYCELL.JPEG2", 0);
    305311        file2->save = true;
    306         file2->index = i;
     312        file2->fileIndex = i;
     313
     314        if (data->doFits) {
     315          pmCell *Fcell1 = pmFPAfileThisCell(data->config->files, view, "PPSKYCELL.BIN1"); // Rebinned cell 1
     316          pmCell *Fcell2 = pmFPAfileThisCell(data->config->files, view, "PPSKYCELL.BIN2"); // Rebinned cell 2
     317
     318          // This is a hack to get a functioning header created so the fits images can be written out.
     319          psMetadataAddS32(Fcell1->concepts,PS_LIST_TAIL,"CELL.XPARITY", PS_META_REPLACE,"",1);
     320          psMetadataAddS32(Fcell1->concepts,PS_LIST_TAIL,"CELL.YPARITY", PS_META_REPLACE,"",1);
     321          psMetadataAddS32(Fcell1->concepts,PS_LIST_TAIL,"CELL.READDIR", PS_META_REPLACE,"",1);
     322          psMetadataAddS32(Fcell2->concepts,PS_LIST_TAIL,"CELL.XPARITY", PS_META_REPLACE,"",1);
     323          psMetadataAddS32(Fcell2->concepts,PS_LIST_TAIL,"CELL.YPARITY", PS_META_REPLACE,"",1);
     324          psMetadataAddS32(Fcell2->concepts,PS_LIST_TAIL,"CELL.READDIR", PS_META_REPLACE,"",1);
     325
     326          psMetadataAddS32(Fcell1->parent->concepts,PS_LIST_TAIL,"CHIP.XPARITY", PS_META_REPLACE,"",1);
     327          psMetadataAddS32(Fcell1->parent->concepts,PS_LIST_TAIL,"CHIP.YPARITY", PS_META_REPLACE,"",1);
     328          psMetadataAddS32(Fcell2->parent->concepts,PS_LIST_TAIL,"CHIP.XPARITY", PS_META_REPLACE,"",1);
     329          psMetadataAddS32(Fcell2->parent->concepts,PS_LIST_TAIL,"CHIP.YPARITY", PS_META_REPLACE,"",1);
     330
     331          pmReadout *Fro1 = pmReadoutAlloc(Fcell1), *Fro2 = pmReadoutAlloc(Fcell2); // Binned readouts
     332         
     333          Fro1->image = image1;
     334          Fro2->image = image2;
     335          Fro1->mask = mask1;
     336          Fro2->mask = mask2;
     337         
     338          Fro1->data_exists = Fcell1->data_exists = Fcell1->parent->data_exists = true;
     339          Fro2->data_exists = Fcell2->data_exists = Fcell2->parent->data_exists = true;
     340         
     341          pmFPAfile *fits1 = pmFPAfileSelectSingle(data->config->files, "PPSKYCELL.BIN1", 0);
     342          fits1->save = true;
     343          fits1->fileIndex = i;
     344          pmFPAfile *fits2 = pmFPAfileSelectSingle(data->config->files, "PPSKYCELL.BIN2", 0);
     345          fits2->save = true;
     346          fits2->fileIndex = i;
     347        }
     348
     349        psFree(view);
    307350#if 0
    308351        {
Note: See TracChangeset for help on using the changeset viewer.