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:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana

  • trunk/Ohana/src/addstar/src/GetFileMode.c

    r35108 r35416  
    2020  havePHOT_VER = gfits_scan (header, "PHOT_VER", "%s", 1, ctmp);
    2121  haveTARG_VER = gfits_scan (header, "TARG_VER", "%s", 1, ctmp);
    22   if (havePHOT_VER && haveTARG_VER) return SDSS_OBJ;
     22  if (havePHOT_VER && haveTARG_VER) {
     23    if (VERBOSE) fprintf (stderr, "found SDSS objects\n");
     24    return SDSS_OBJ;
     25  }
    2326
    2427  if (haveNaxis && (Naxis == 2)) {
     
    2831    if ((Nx > 0) && (Ny > 0)) {
    2932      if (haveCTYPE && !strcmp (&ctype[4], "-WRP")) {
     33        if (VERBOSE) fprintf (stderr, "found MOSAIC CMP\n");
    3034        return MOSAIC_CMP;
    3135      }
     36      if (VERBOSE) fprintf (stderr, "found SIMPLE CMP\n");
    3237      return SIMPLE_CMP;
    3338    }
     
    3641  if (haveNaxis && (TEXTMODE || !simple)) {
    3742    if (haveCTYPE && !strcmp (&ctype[4], "-WRP")) {
     43      if (VERBOSE) fprintf (stderr, "found MOSAIC CMP\n");
    3844      return MOSAIC_CMP;
    3945    }
     46    if (VERBOSE) fprintf (stderr, "found SIMPLE CMP\n");
    4047    return SIMPLE_CMP;
    4148  }
     
    4350  if (!extend && strcmp (&ctype[4], "-DIS")) {
    4451    if (!strcmp (&ctype[4], "-WRP")) {
     52      if (VERBOSE) fprintf (stderr, "found MOSAIC CMF\n");
    4553      return MOSAIC_CMF;
    4654    }
     55    if (VERBOSE) fprintf (stderr, "found SIMPLE CMF\n");
    4756    return SIMPLE_CMF;
    4857  }
    4958
    5059  if (!extend && !strcmp (&ctype[4], "-DIS")) {
     60    if (VERBOSE) fprintf (stderr, "found MOSAIC PHU\n");
    5161    return MOSAIC_PHU;
    5262  }
    5363
    5464  if (extend && strcmp (&ctype[4], "-DIS")) {
     65    if (VERBOSE) fprintf (stderr, "found SIMPLE MEF\n");
    5566    return SIMPLE_MEF;
    5667  }
    5768
    5869  if (extend && !strcmp (&ctype[4], "-DIS")) {
     70    if (VERBOSE) fprintf (stderr, "found MOSAIC MEF\n");
    5971    return MOSAIC_MEF;
    6072  }
    6173
     74  if (VERBOSE) fprintf (stderr, "extension type is unknown\n");
    6275  return (NONE);
    6376}
  • trunk/Ohana/src/addstar/src/MatchHeaders.c

    r34405 r35416  
    6161    if (!strcmp (exttype, "PS1_SV1")) goto keep;
    6262    if (!strcmp (exttype, "PS1_SV2")) goto keep;
     63    if (!strcmp (exttype, "PS1_DV3")) {
     64      goto keep;
     65    }
    6366    continue;
    6467
  • trunk/Ohana/src/addstar/src/ReadStarsFITS.c

    r34580 r35416  
    1515Stars     *Convert_PS1_SV1_Alt    PROTO((FTable *table, unsigned int *nstars));
    1616Stars     *Convert_PS1_SV2        PROTO((FTable *table, unsigned int *nstars));
     17Stars     *Convert_PS1_DV3        PROTO((FTable *table, unsigned int *nstars));
    1718
    1819// given a file with the pointer at the start of the table block and the
     
    7879    stars = Convert_PS1_SV2 (&table, &Nstars);
    7980  }
     81  if (!strcmp (type, "PS1_DV3")) {
     82    stars = Convert_PS1_DV3 (&table, &Nstars);
     83  }
    8084  if (stars == NULL) {
    8185    fprintf (stderr, "invalid table type %s\n", type);
     
    962966}
    963967
    964 
     968Stars *Convert_PS1_DV3 (FTable *table, unsigned int *nstars) {
     969
     970  off_t Nstars;
     971  unsigned int i;
     972  double ZeroPt;
     973  Stars *stars;
     974  CMF_PS1_DV3 *ps1data;
     975
     976  ps1data = gfits_table_get_CMF_PS1_DV3 (table, &Nstars, NULL);
     977  if (!ps1data) {
     978    fprintf (stderr, "skipping inconsistent entry\n");
     979    return (NULL);
     980  }
     981  ZeroPt = GetZeroPoint();
     982
     983  ALLOCATE (stars, Stars, Nstars);
     984  for (i = 0; i < Nstars; i++) {
     985    InitStar (&stars[i]);
     986    stars[i].measure.Xccd       = ps1data[i].X;
     987    stars[i].measure.Yccd       = ps1data[i].Y;
     988    stars[i].measure.dXccd      = ToShortPixels(ps1data[i].dX);
     989    stars[i].measure.dYccd      = ToShortPixels(ps1data[i].dY);
     990
     991    stars[i].measure.posangle   = ToShortDegrees(ps1data[i].posangle);
     992    stars[i].measure.pltscale   = ps1data[i].pltscale;
     993
     994    if ((ps1data[i].M >= 0.0) || isnan(ps1data[i].M)) {
     995      stars[i].measure.M      = NAN;
     996    } else {
     997      stars[i].measure.M      = ps1data[i].M + ZeroPt;
     998    }
     999    stars[i].measure.dM         = ps1data[i].dM;
     1000    stars[i].measure.dMcal      = ps1data[i].dMcal;
     1001    stars[i].measure.Map        = ps1data[i].Map + ZeroPt;
     1002                       
     1003    stars[i].measure.Mkron      = (ps1data[i].kronFlux > 0.0) ? -2.5*log10(ps1data[i].kronFlux) + ZeroPt : NAN;
     1004    stars[i].measure.dMkron     = (ps1data[i].kronFlux > 0.0) ? ps1data[i].kronFluxErr / ps1data[i].kronFlux : NAN;
     1005                       
     1006    // these fluxes are converted from counts to counts/sec in FilterStars.c
     1007    stars[i].measure.FluxPSF    = ps1data[i].Flux;
     1008    stars[i].measure.dFluxPSF   = ps1data[i].dFlux;
     1009    stars[i].measure.FluxKron   = ps1data[i].kronFlux;
     1010    stars[i].measure.dFluxKron  = ps1data[i].kronFluxErr;
     1011
     1012    stars[i].measure.Sky        = ps1data[i].sky;
     1013    stars[i].measure.dSky       = ps1data[i].dSky;
     1014                       
     1015    stars[i].measure.psfChisq   = ps1data[i].psfChisq;
     1016    stars[i].measure.psfQF      = ps1data[i].psfQF;
     1017    stars[i].measure.psfQFperf  = ps1data[i].psfQFperf;
     1018    stars[i].measure.psfNdof    = ps1data[i].psfNdof;
     1019    stars[i].measure.psfNpix    = ps1data[i].psfNpix;
     1020    stars[i].measure.crNsigma   = ps1data[i].crNsigma;
     1021    stars[i].measure.extNsigma  = ps1data[i].extNsigma;
     1022
     1023    stars[i].measure.FWx        = ToShortPixels(ps1data[i].fx);
     1024    stars[i].measure.FWy        = ToShortPixels(ps1data[i].fy);
     1025    stars[i].measure.theta      = ToShortDegrees(ps1data[i].df);
     1026
     1027    stars[i].measure.Mxx        = ToShortPixels(ps1data[i].Mxx);
     1028    stars[i].measure.Mxy        = ToShortPixels(ps1data[i].Mxy);
     1029    stars[i].measure.Myy        = ToShortPixels(ps1data[i].Myy);
     1030                       
     1031    stars[i].measure.photFlags  = ps1data[i].flags;
     1032
     1033    // this is may optionally be replaced by the internal sequence (see FilterStars.c)
     1034    stars[i].measure.detID      = ps1data[i].detID;
     1035
     1036    // the Average fields and the following Measure fields are set in FilterStars after
     1037    // the image metadata is in hand:  dR, dD, Mcal, dt, airmass, az, t, imageID, extID.
     1038
     1039    // averef is set in find_matches
     1040
     1041    // dbFlags is zero on ingest.
     1042
     1043    // the following fields are currently not being set anywhere: t_msec
     1044  }   
     1045  *nstars = Nstars;
     1046  return (stars);
     1047}
     1048
     1049
     1050
  • trunk/Ohana/src/addstar/src/load2mass_catalog.c

    r34405 r35416  
    2020    // XXX for now, the output objects will have limited astrometric interpretation...
    2121    // XXX every 3 stars represents 3 measurements and 1 average
     22    dvo_average_init (&catalog[0].average[Nave]);
    2223    catalog[0].average[Nave].R     = stars[i].average.R;
    2324    catalog[0].average[Nave].D     = stars[i].average.D;
    24     catalog[0].average[Nave].dR    = 0;
    25     catalog[0].average[Nave].dD    = 0;
    26     catalog[0].average[Nave].uR    = 0;
    27     catalog[0].average[Nave].uD    = 0;
    28     catalog[0].average[Nave].duR   = 0;
    29     catalog[0].average[Nave].duD   = 0;
    30     catalog[0].average[Nave].P     = 0;
    31     catalog[0].average[Nave].dP    = 0;
    32 
    33     // XXX for now, set the average mag data to NULL
    34     catalog[0].average[Nave].Nmeasure      = 0;
    35     catalog[0].average[Nave].Nmissing      = 0;
    36     catalog[0].average[Nave].ChiSqAve      = NAN_S_SHORT;
    3725    catalog[0].average[Nave].measureOffset = Nmeas;
    38     catalog[0].average[Nave].missingOffset = -1;
    39     catalog[0].average[Nave].flags         = 0;
    4026
    4127    for (j = 0; j < Nsec; j++) {
    42       catalog[0].secfilt[Nave*Nsec+j].M     = NAN;
    43       catalog[0].secfilt[Nave*Nsec+j].dM    = NAN;
    44       catalog[0].secfilt[Nave*Nsec+j].Xm    = NAN_S_SHORT;
    45       catalog[0].secfilt[Nave*Nsec+j].M_20  = NAN_S_SHORT;
    46       catalog[0].secfilt[Nave*Nsec+j].M_80  = NAN_S_SHORT;
    47       catalog[0].secfilt[Nave*Nsec+j].Ncode = 0;
    48       catalog[0].secfilt[Nave*Nsec+j].Nused = 0;
     28      dvo_secfilt_init (&catalog[0].secfilt[Nave*Nsec+j]);
    4929    }
    5030
Note: See TracChangeset for help on using the changeset viewer.