IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Dec 17, 2015, 8:53:56 PM (11 years ago)
Author:
eugene
Message:

merge astrometric corrections into setphot; add some history headers

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/uniphot/src/dcr_correction.c

    r37807 r39288  
    2626
    2727  char type[16];
    28   char extname[80];
    2928
    3029  Header header;
     
    6766    if (!gfits_fread_ftable_data (f, &ftable, FALSE)) return (FALSE);
    6867   
    69     if (!gfits_scan (&theader, "EXTNAME", "%s", 1, extname)) return (FALSE);
     68    char word[80];
     69    if (!gfits_scan (&theader, "EXTNAME", "%s", 1, word)) return (FALSE);
     70    char *extname = strcreate(word);
    7071
    7172    // figure out the filter and direction from the EXTNAME
     73    // EXTNAME is of the form DCR.[grizy].dP[xy]
    7274
    73     // EXTNAME is of the form [grizy].[xy].v0 where
    74     char filtname = extname[0];
     75    char *ptr = NULL;
     76    char *w0 = strtok_r (extname, ".", &ptr); myAssert (w0, "invalid dcr file");
     77    char *w1 = strtok_r (NULL, ".", &ptr); myAssert (w1, "invalid dcr file");
     78    char *w2 = strtok_r (NULL, ".", &ptr); myAssert (w2, "invalid dcr file");
     79   
     80    myAssert (!strcmp(w0, "DCR"), "invalid dcr file");
     81
     82    char filtname = w1[0];
    7583    int filtnum = -1;
    7684    switch (filtname) {
     
    8694
    8795    int dir = -1;
    88     if (extname[2] == 'x') {
     96    if (w2[2] == 'x') {
    8997      dir = 0;
    9098    }
    91     if (extname[2] == 'y') {
     99    if (w2[2] == 'y') {
    92100      dir = 1;
    93101    }
Note: See TracChangeset for help on using the changeset viewer.