IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Apr 19, 2013, 4:31:05 PM (13 years ago)
Author:
eugene
Message:

merge changes from eam_branches/ipp-20130307 : parallelize dvosecfilt, use dvo_average,measure,secfilt_init functions more broadly; move image calibration to relphot_images; add synthetic photometry referece (w-band); put relphot MARKTIME & INITTIME in macros; in dvo_clients, mextract fields which need image data use a subset image metadata table (instead of loading full Images.dat table); create FIELD and MOSAIC fields for mextract; somewhat better rules for photcode:ave & similar selections in mextract; add hpm_* concept in relastro (high-speed proper motions); fix precision errors in dvopsps; check for dvopsps exit conditions; error-bar clipping to limits of plotting window; parallelize delstar -dup-images; do NOT delete parents (because parent IDs are broken after dvomerge); minor handshake when setting up KAPA connection; avextract and related do not need to launch remote jobs on all clients if region does not include tables from all hosts; add fitplx and xsection functions to mana; enable addstar of diff cmfs (at least PS1_DV3)

Location:
trunk/Ohana
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana

  • trunk/Ohana/src/libdvo/src/ImageMetadata.c

    r35263 r35416  
    6363  GET_COLUMN (crval1,   "CRVAL1",         double);
    6464  GET_COLUMN (crval2,   "CRVAL2",         double);
     65  GET_COLUMN (theta,    "THETA",          float);
    6566  GET_COLUMN (Mcal,     "MCAL",           float);
    6667  GET_COLUMN (secz,     "SECZ",           float);
     
    7576    image[i].crval1   = crval1[i]  ;
    7677    image[i].crval2   = crval2[i]  ;
     78    image[i].theta    = theta[i]  ;
    7779    image[i].Mcal     = Mcal[i]    ;
    7880    image[i].secz     = secz[i]    ;
     
    8789  free (crval1);
    8890  free (crval2);
     91  free (theta);
    8992  free (Mcal);
    9093  free (secz);
     
    112115  FTable ftable;
    113116
     117  BuildChipMatch (image, Nimage);
     118
    114119  gfits_init_header (&header);
    115120  header.extend = TRUE;
     
    124129  gfits_define_bintable_column (&theader, "D", "CRVAL1", "ra at center", "degrees", 1.0, 0.0);
    125130  gfits_define_bintable_column (&theader, "D", "CRVAL2", "dec at center", "degrees", 1.0, 0.0);
     131  gfits_define_bintable_column (&theader, "E", "THETA", "camera rot angle", "degrees", 1.0, 0.0);
    126132  gfits_define_bintable_column (&theader, "E", "MCAL", "zero point offset", "magnitudes", 1.0, 0.0);
    127133  gfits_define_bintable_column (&theader, "E", "SECZ", "airmass", "none", 1.0, 0.0);
     
    134140  unsigned int *imageID, *externID, *expname;
    135141  double *crval1, *crval2;
    136   float *Mcal, *Xcenter, *Ycenter, *secz;
     142  float *Mcal, *Xcenter, *Ycenter, *secz, *theta;
    137143
    138144  // create intermediate storage arrays
     
    142148  ALLOCATE (crval1,   double,         Nimage);
    143149  ALLOCATE (crval2,   double,         Nimage);
     150  ALLOCATE (theta,    float,          Nimage);
    144151  ALLOCATE (Mcal,     float,          Nimage);
    145152  ALLOCATE (secz,     float,          Nimage);
     
    149156  // assign the storage arrays
    150157  for (i = 0; i < Nimage; i++) {
     158    int Nmosaic = FindMosaicForImage (image, Nimage, i);
     159    if (!Nmosaic) continue;
     160    Nmosaic --;
    151161    imageID[i]  = image[i].imageID;
    152162    externID[i] = image[i].externID;
    153     crval1[i]   = image[i].coords.crval1;
    154     crval2[i]   = image[i].coords.crval2;
     163    crval1[i]   = image[Nmosaic].coords.crval1;
     164    crval2[i]   = image[Nmosaic].coords.crval2;
     165
     166    theta[i]    = DEG_RAD*atan2(image[Nmosaic].coords.pc1_2, image[Nmosaic].coords.pc1_1);
     167
    155168    Mcal[i]     = image[i].Mcal;
    156169    secz[i]     = image[i].secz;
     
    172185  gfits_set_bintable_column (&theader, &ftable, "CRVAL1",         crval1,  Nimage);
    173186  gfits_set_bintable_column (&theader, &ftable, "CRVAL2",         crval2,  Nimage);
     187  gfits_set_bintable_column (&theader, &ftable, "THETA",          theta,   Nimage);
    174188  gfits_set_bintable_column (&theader, &ftable, "MCAL",           Mcal,    Nimage);
    175189  gfits_set_bintable_column (&theader, &ftable, "SECZ",           secz,    Nimage);
     
    182196  free (crval1);
    183197  free (crval2);
     198  free (theta);
    184199  free (Mcal);
    185200  free (secz);
Note: See TracChangeset for help on using the changeset viewer.