IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 6720


Ignore:
Timestamp:
Mar 28, 2006, 2:57:23 PM (20 years ago)
Author:
Paul Price
Message:

Adding pmFPACopy.c and pmFPACopy.h These compile, but not yet tested.

Location:
branches/rel10_ifa/psModules/src/astrom
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • branches/rel10_ifa/psModules/src/astrom/Makefile.am

    r6713 r6720  
    66        pmFPA.c \
    77        pmFPAConstruct.c \
     8        pmFPACopy.c \
    89        pmFPAMaskWeight.c \
    910        pmFPARead.c \
     
    2829        pmFPA.h \
    2930        pmFPAConstruct.h \
     31        pmFPACopy.h \
    3032        pmFPAMaskWeight.h \
    3133        pmFPARead.h \
  • branches/rel10_ifa/psModules/src/astrom/pmFPACopy.c

    r6682 r6720  
    33
    44#include "pslib.h"
     5#include "psImageFlip.h"
     6#include "psRegionIsBad.h"
     7
    58#include "pmFPA.h"
    69#include "pmFPAUtils.h"
    710#include "pmHDU.h"
     11#include "pmHDUUtils.h"
     12#include "pmFPACopy.h"
    813
    914#define MAX(x,y) ((x) > (y) ? (x) : (y))
     
    5358static bool cellList(psList *targets,   // The list of target cells
    5459                     psList *sources,   // The list of source cells
    55                      const pmCell *targetCell, // The target cell
    56                      const pmCell *sourceCell // The source cell
     60                     pmCell *targetCell, // The target cell
     61                     pmCell *sourceCell // The source cell
    5762                    )
    5863{
     
    9499    }
    95100
    96     return list;
     101    return true;
    97102}
    98103
     
    226231        psRegion *trimsec = psMetadataLookupPtr(&mdok, target->concepts, "CELL.TRIMSEC"); // Trim section
    227232        if (!mdok || !trimsec) {
    228             psLogMsg(PS_ERR_IO, true, "CELL.TRIMSEC has not been initialised in target cell --- ignored.\n");
     233            psLogMsg(__func__, PS_LOG_WARN, "CELL.TRIMSEC has not been initialised in target cell --- "
     234                     "ignored.\n");
    229235            continue;
    230236        }
     
    239245        pmReadout *readout = source->readouts->data[0]; // The first source readout, as representative
    240246        psImage *image = readout->image;// The proper image
    241         *trimsec = sectionForImage(position, bias, readdir);
     247        *trimsec = sectionForImage(&position, image, readdir);
    242248    }
    243249
     
    258264
    259265// Generate an HDU with the pixels
    260 static bool generateHDU(pmCell *target  // The target cell
    261                         const pmCell *source // The source cell
     266static bool generateHDU(pmCell *target,  // The target cell
     267                        pmCell *source // The source cell
    262268                       )
    263269{
     
    266272    psList *targetCells = psListAlloc(NULL); // List of target cells below the target HDU
    267273    psList *sourceCells = psListAlloc(NULL); // List of source cells below the target HDU
    268     if (! cellList(targetCells, sources, target, source)) {
     274    if (! cellList(targetCells, sourceCells, target, source)) {
    269275        psError(PS_ERR_IO, true, "Unable to find cells to generate HDU!\n");
    270276        return false;
     
    288294
    289295        }
    290         psFree(cellsIter);
     296        psFree(iter);
    291297    }
    292298
     
    327333        UPDATE_CASE(PS_TYPE_F32, F32);
    328334        UPDATE_CASE(PS_TYPE_F64, F64);
    329         UPDATE_CASE(PS_DATA_STR, V);
     335        UPDATE_CASE(PS_DATA_STRING, V);
    330336    default:
    331337        psLogMsg(__func__, PS_LOG_WARN, "Unsupported type (%x) for concept %s --- ignored.\n",
     
    416422        pmCell *targetCell = targetCells->data[i]; // The target cell
    417423        const char *cellName = psMetadataLookupStr(NULL, targetCell->concepts, "CELL.NAME"); // Name of cell
    418         int cellNum = pmFPAFindCell(source, cellName); // Number of cell with that name
     424        int cellNum = pmChipFindCell(source, cellName); // Number of cell with that name
    419425        if (cellNum >= 0) {
    420426            pmCell *sourceCell = sourceCells->data[cellNum]; // The source cell
     
    447453    pmHDU *hdu = pmHDUFromCell(target); // The target HDU; we need to fix this up
    448454    if (! hdu->images) {
    449         generateHDU(cell);
     455        generateHDU(target, source);
    450456    }
    451457
     
    496502        while ((biassec = psListGetAndIncrement(biassecsIter))) {
    497503            if (psRegionIsBad(*biassec)) {
    498                 psString *biassecString = psRegionToString(biassec); // String for bias section
     504                psString biassecString = psRegionToString(*biassec); // String for bias section
    499505                psLogMsg(__func__, PS_LOG_WARN, "Bias section (%s) isn't set --- ignored.\n", biassecString);
    500506                psFree(biassecString);
  • branches/rel10_ifa/psModules/src/astrom/pmFPARead.c

    r6713 r6720  
    66#include "pmFPA.h"
    77#include "pmFPARead.h"
     8#include "pmHDU.h"
     9#include "pmHDUUtils.h"
    810#include "pmConcepts.h"
    911#include "psRegionIsBad.h"
Note: See TracChangeset for help on using the changeset viewer.