IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 8, 2006, 6:27:04 PM (20 years ago)
Author:
jhoblitt
Message:

major overhaul to p0search;

remove -pending
remove -update
add -pendingimfile
add -pendingexp (not yet working)
add -updateexp
add -updateimfile

move newToRawDetrendExp() from pxframes.c -> p0search.c

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippTools/src/pxframes.c

    r8187 r8250  
    66
    77#include "pxtools.h"
    8 
    9 static rawDetrendExpRow *newToRawDetrendExp(pxConfig *config, newExpRow *exp);
    108
    119#define PX_FRAME_ALLOC(frametype, exptype) \
     
    160158}
    161159
     160/*
    162161rawDetrendFrame *newToRawDetrendFrame(pxConfig *config, newFrame *newFrame)
    163162{
     
    189188    return rawDetrendFrame;
    190189}
     190*/
    191191
    192192bool rawDetrendFrameInsert(pxConfig *config, rawDetrendFrame *frame)
     
    213213    return true;
    214214}
    215 
    216 static rawDetrendExpRow *newToRawDetrendExp(pxConfig *config, newExpRow *exp)
    217 {
    218     PS_ASSERT_PTR_NON_NULL(config, NULL);
    219     PS_ASSERT_PTR_NON_NULL(exp, NULL);
    220 
    221     bool status = false;
    222     psString filter = psMetadataLookupStr(&status, config->args, "-filter");
    223     if (!status) {
    224         psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -filter");
    225         return false;
    226     }
    227     if (!filter) {
    228         psError(PS_ERR_UNKNOWN, true, "-filter is required");
    229         return false;
    230     }
    231     psF32 airmass = psMetadataLookupF32(&status, config->args, "-airmass");
    232     if (!status) {
    233         psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -airmass");
    234         return false;
    235     }
    236     if (isnan(airmass)) {
    237         psError(PS_ERR_UNKNOWN, true, "-airmass is required");
    238         return false;
    239     }
    240     psF64 ra = psMetadataLookupF64(&status, config->args, "-ra");
    241     if (!status) {
    242         psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -ra");
    243         return false;
    244     }
    245     if (isnan(ra)) {
    246         psError(PS_ERR_UNKNOWN, true, "-airmass is required");
    247         return false;
    248     }
    249     psF64 decl = psMetadataLookupF64(&status, config->args, "-decl");
    250     if (!status) {
    251         psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -decl");
    252         return false;
    253     }
    254     if (isnan(decl)) {
    255         psError(PS_ERR_UNKNOWN, true, "-decl is required");
    256         return false;
    257     }
    258     psF32 exp_time = psMetadataLookupF32(&status, config->args, "-exp_time");
    259     if (isnan(exp_time)) {
    260         psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -exp_time");
    261         return false;
    262     }
    263     if (!exp_time) {
    264         psError(PS_ERR_UNKNOWN, true, "-exp_time is required");
    265         return false;
    266     }
    267     psF64 background = psMetadataLookupF64(&status, config->args, "-background");
    268     if (!status) {
    269         psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -background");
    270         return false;
    271     }
    272     if (!exp_time) {
    273         psError(PS_ERR_UNKNOWN, true, "-background is required");
    274         return false;
    275     }
    276 
    277     return rawDetrendExpRowAlloc(
    278         exp->exp_id,
    279         exp->camera,
    280         exp->telescope,
    281         exp->exp_type,
    282         exp->imfiles,
    283         filter,
    284         airmass,
    285         ra,
    286         decl,
    287         exp_time,
    288         background
    289     );
    290 }
Note: See TracChangeset for help on using the changeset viewer.