IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Nov 21, 2005, 5:00:14 PM (20 years ago)
Author:
Paul Price
Message:

Mask and weight input and output

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/archive/scripts/src/phase2/pmFPA.c

    r5462 r5564  
    4040//////////////////////////////////////////////////////////////////////////////////////////////////////////////
    4141
    42 pmPixelData *pmPixelDataAlloc(const char *extname)
    43 {
    44     pmPixelData *pd = psAlloc(sizeof(pmPixelData));
    45     psMemSetDeallocator(pd, (psFreeFunc)p_pmPixelDataFree);
     42p_pmHDU *p_pmHDUAlloc(const char *extname)
     43{
     44    p_pmHDU *pd = psAlloc(sizeof(p_pmHDU));
     45    psMemSetDeallocator(pd, (psFreeFunc)p_pmHDUFree);
    4646
    4747    pd->extname = extname;
     
    5454}
    5555
    56 void p_pmPixelDataFree(pmPixelData *pd)
    57 {
    58     psFree(pd->header);
    59     psFree(pd->images);
    60     psFree(pd->masks);
    61     psFree(pd->weights);
     56void p_pmHDUFree(p_pmHDU *hdu)
     57{
     58    psFree(hdu->header);
     59    psFree(hdu->images);
     60    psFree(hdu->masks);
     61    psFree(hdu->weights);
    6262}
    6363
     
    7777    fpa->chips = psArrayAlloc(0);
    7878
    79     fpa->data = NULL;
     79    fpa->hdu = NULL;
    8080
    8181    return fpa;
     
    9292    psFree(fpa->chips);
    9393
    94     psFree(fpa->data);
     94    psFree(fpa->hdu);
    9595}
    9696
     
    119119    chip->valid = true;   
    120120
    121     chip->data = NULL;
     121    chip->hdu = NULL;
    122122
    123123    psMetadataAddStr(chip->concepts, PS_LIST_HEAD, "CHIP.NAME", 0, "Chip name added at pmChipAlloc", name);
     
    134134    psFree(chip->cells);
    135135
    136     psFree(chip->data);
     136    psFree(chip->hdu);
    137137
    138138    // We don't free the parent member, since that would generate a circular call.  We don't increment the
     
    156156
    157157    cell->toChip = NULL;
    158     cell->fromChip = NULL;
    159158    cell->toFPA = NULL;
    160     cell->toTP = NULL;
    161159    cell->toSky = NULL;
    162160
     
    171169    cell->valid = true;
    172170
    173     cell->data = NULL;
     171    cell->hdu = NULL;
    174172
    175173    return cell;
     
    179177{
    180178    psFree(cell->toChip);
    181     psFree(cell->fromChip);
    182179    psFree(cell->toFPA);
    183     psFree(cell->toTP);
    184180    psFree(cell->toSky);
    185181
     
    188184    psFree(cell->readouts);
    189185
    190     psFree(cell->data);
     186    psFree(cell->hdu);
    191187
    192188    // We don't free the parent member, since that would generate a circular call.  We don't increment the
     
    197193                          psImage *image, // The pixels
    198194                          psImage *mask,// The mask pixels
    199                           int col0, int row0, int colParity, int rowParity, int colBin, int rowBin // Data
     195                          int col0, int row0, int colBin, int rowBin // Data
    200196    )
    201197{
     
    215211    *(int*)&readout->col0 = col0;
    216212    *(int*)&readout->row0 = row0;
    217     *(int*)&readout->colParity = colParity;
    218     *(int*)&readout->rowParity = rowParity;
    219213    *(int*)&readout->colBins = colBin;
    220214    *(int*)&readout->rowBins = rowBin;
Note: See TracChangeset for help on using the changeset viewer.