IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 9, 2006, 3:04:45 PM (20 years ago)
Author:
magnier
Message:

fleshing out support for detselect

File:
1 edited

Legend:

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

    r9290 r9437  
    247247            formatName = words->data[1];
    248248            file->camera = pmConfigCameraByName(config, words->data[0]);
     249            // XXX do we need to save the camera name?
    249250            if (!file->camera) {
    250251                psError(PS_ERR_IO, false, "camera %s not found\n", (char *)words->data[0]);
     
    611612        return NULL;
    612613    }
     614    // a camera config is needed (as source of file rule)
     615    if (config->cameraName == NULL) {
     616        psAbort ("pmFPAfileDefine", "camera defined but not cameraName!");
     617    }
    613618
    614619    // find or define a pmFPAfile with this name
     
    633638    // detselect -camera (camera) -time (time) -type (type) [others]
    634639    // camera and time are functions of (pmFPA *input)
    635 
    636     // XXX does this do something NASTY to the stack??
     640    // XXX we need to get the time, but we don't have the CELL.TIME yet set (no CELL yet read)
     641    // add other options here f(pmFPA *input, type)
    637642    psTime *time = psTimeGetNow (PS_TIME_TAI);
    638 
    639     psString camera = psStringCopy ("megacam");
    640     pmDetrendSelectOptions *options = pmDetrendSelectOptionsAlloc(camera, *time, type);
    641     psFree (camera);
     643    pmDetrendSelectOptions *options = pmDetrendSelectOptionsAlloc(config->cameraName, *time, type);
    642644    psFree (time);
    643 
    644     // add other options here f(pmFPA *input, type)
    645645
    646646    // search for existing detrend data (detID)
    647647    pmDetrendSelectResults *results = pmDetrendSelect (options);
    648648    if (!results) {
    649         psLogMsg ("pmFPAfile", 2, "no matching detrend data");
    650         psError (PS_ERR_IO, true, "no matching detrend data");
     649        psError (PS_ERR_IO, false, "no matching detrend data");
    651650        return NULL;
    652651    }
Note: See TracChangeset for help on using the changeset viewer.