IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 37621


Ignore:
Timestamp:
Nov 17, 2014, 8:02:39 AM (12 years ago)
Author:
eugene
Message:

add option to make a single chip per mosaic (for faster testing)

Location:
branches/eam_branches/ipp-20140904/Ohana/src/fakeastro
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20140904/Ohana/src/fakeastro/include/fakeastro.h

    r37564 r37621  
    8888int    VERBOSE2;
    8989int    TESTING;
     90int    ONE_BIG_CHIP;
    9091
    9192int    FORCE;
  • branches/eam_branches/ipp-20140904/Ohana/src/fakeastro/src/args.c

    r37564 r37621  
    3030    remove_argument (N, argc, argv);
    3131    TESTING = TRUE;
     32  }
     33  ONE_BIG_CHIP = FALSE;
     34  if ((N = get_argument (*argc, argv, "-one-big-chip"))) {
     35    remove_argument (N, argc, argv);
     36    ONE_BIG_CHIP = TRUE;
    3237  }
    3338
  • branches/eam_branches/ipp-20140904/Ohana/src/fakeastro/src/make_fake_images.c

    r37531 r37621  
    2323  int N = 1;
    2424
    25   int ix, iy;
    26   for (ix = 0; ix < 8; ix++) {
    27     for (iy = 0; iy < 8; iy++) {
     25  if (ONE_BIG_CHIP) {
     26    fakeImage[N] = fakeImage[0];
     27
     28    // coords map relative to image center:
     29    fakeImage[N].coords.crval1 = 0.0;
     30    fakeImage[N].coords.crval2 = 0.0;
     31
     32    fakeImage[N].coords.crpix1 = 0.5*8*5000;
     33    fakeImage[N].coords.crpix2 = 0.5*8*5000;
     34    fakeImage[N].coords.pc1_1 = 1.0;
     35    fakeImage[N].coords.pc2_2 = 1.0;
     36
     37    fakeImage[N].coords.cdelt1 = 1.0;
     38    fakeImage[N].coords.cdelt2 = 1.0;
     39
     40    fakeImage[N].coords.pc1_2 = 0.0;
     41    fakeImage[N].coords.pc2_1 = 0.0;
     42
     43    strcpy (fakeImage[N].coords.ctype, "DEC--WRP");
     44    fakeImage[N].coords.Npolyterms = 1;
     45
     46    fakeImage[N].coords.mosaic = &fakeImage[0].coords;
     47
     48    fakeImage[N].NX = 8*5000;
     49    fakeImage[N].NY = 8*5000;
     50
     51    fakeImage[N].imageID = IMAGE_ID;
     52    IMAGE_ID ++;
     53
     54    // gpc1-specific (assumes grizy map to 10101, etc)
     55    fakeImage[N].photcode = fakeImage[0].photcode + 01;
     56
     57    char *ptr = strstr (fakeImage[N].name, "[PHU]");
     58    if (ptr) {
     59      snprintf (ptr, 7, "[XY01]");
     60    }
     61    N++;
     62  } else {
     63    int ix, iy;
     64    for (ix = 0; ix < 8; ix++) {
     65      for (iy = 0; iy < 8; iy++) {
    2866     
    29       if ((ix == 0) && (iy == 0)) continue;
    30       if ((ix == 7) && (iy == 0)) continue;
    31       if ((ix == 0) && (iy == 7)) continue;
    32       if ((ix == 7) && (iy == 7)) continue;
     67        if ((ix == 0) && (iy == 0)) continue;
     68        if ((ix == 7) && (iy == 0)) continue;
     69        if ((ix == 0) && (iy == 7)) continue;
     70        if ((ix == 7) && (iy == 7)) continue;
    3371
    34       fakeImage[N] = fakeImage[0];
     72        fakeImage[N] = fakeImage[0];
    3573
    36       // coords map relative to image center:
    37       fakeImage[N].coords.crval1 = 0.0;
    38       fakeImage[N].coords.crval2 = 0.0;
     74        // coords map relative to image center:
     75        fakeImage[N].coords.crval1 = 0.0;
     76        fakeImage[N].coords.crval2 = 0.0;
    3977
    40       if (ix < 4) {
    41         fakeImage[N].coords.crpix1 = (ix - 3)*5000;
    42         fakeImage[N].coords.crpix2 = (iy - 3)*5100;
    43         fakeImage[N].coords.pc1_1 = 1.0;
    44         fakeImage[N].coords.pc2_2 = 1.0;
    45       } else {
    46         fakeImage[N].coords.crpix1 = (4 - ix)*5000;
    47         fakeImage[N].coords.crpix2 = (4 - iy)*5100;
    48         fakeImage[N].coords.pc1_1 = -1.0;
    49         fakeImage[N].coords.pc2_2 = -1.0;
    50       }
     78        if (ix < 4) {
     79          fakeImage[N].coords.crpix1 = (ix - 3)*5000;
     80          fakeImage[N].coords.crpix2 = (iy - 3)*5100;
     81          fakeImage[N].coords.pc1_1 = 1.0;
     82          fakeImage[N].coords.pc2_2 = 1.0;
     83        } else {
     84          fakeImage[N].coords.crpix1 = (4 - ix)*5000;
     85          fakeImage[N].coords.crpix2 = (4 - iy)*5100;
     86          fakeImage[N].coords.pc1_1 = -1.0;
     87          fakeImage[N].coords.pc2_2 = -1.0;
     88        }
    5189
    52       fakeImage[N].coords.cdelt1 = 1.0;
    53       fakeImage[N].coords.cdelt2 = 1.0;
     90        fakeImage[N].coords.cdelt1 = 1.0;
     91        fakeImage[N].coords.cdelt2 = 1.0;
    5492
    55       fakeImage[N].coords.pc1_2 = 0.0;
    56       fakeImage[N].coords.pc2_1 = 0.0;
     93        fakeImage[N].coords.pc1_2 = 0.0;
     94        fakeImage[N].coords.pc2_1 = 0.0;
    5795
    58       strcpy (fakeImage[N].coords.ctype, "DEC--WRP");
    59       fakeImage[N].coords.Npolyterms = 1;
     96        strcpy (fakeImage[N].coords.ctype, "DEC--WRP");
     97        fakeImage[N].coords.Npolyterms = 1;
    6098
    61       // XXX add higher order polynomials or imagemaps here
     99        // XXX add higher order polynomials or imagemaps here
    62100
    63       fakeImage[N].coords.mosaic = &fakeImage[0].coords;
     101        fakeImage[N].coords.mosaic = &fakeImage[0].coords;
    64102
    65       fakeImage[N].NX = 4850;
    66       fakeImage[N].NY = 4850;
     103        fakeImage[N].NX = 4850;
     104        fakeImage[N].NY = 4850;
    67105
    68       fakeImage[N].imageID = IMAGE_ID;
    69       IMAGE_ID ++;
     106        fakeImage[N].imageID = IMAGE_ID;
     107        IMAGE_ID ++;
    70108
    71       // gpc1-specific (assumes grizy map to 10101, etc)
    72       fakeImage[N].photcode = fakeImage[0].photcode + iy*10 + ix;
     109        // gpc1-specific (assumes grizy map to 10101, etc)
     110        fakeImage[N].photcode = fakeImage[0].photcode + iy*10 + ix;
    73111
    74       char *ptr = strstr (fakeImage[N].name, "[PHU]");
    75       if (ptr) {
    76         snprintf (ptr, 7, "[XY%d%d]", ix, iy);
     112        char *ptr = strstr (fakeImage[N].name, "[PHU]");
     113        if (ptr) {
     114          snprintf (ptr, 7, "[XY%d%d]", ix, iy);
     115        }
     116        N++;
    77117      }
    78       N++;
    79118    }
    80119  }
Note: See TracChangeset for help on using the changeset viewer.