IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 42077


Ignore:
Timestamp:
Feb 28, 2022, 12:08:57 PM (4 years ago)
Author:
eugene
Message:

update UKIRT load tools for LAS, UHS, GPC, GPS; add option to overload convolved radial aperture fluxes on lensing second moment fields (for UNIONS DR3)

Location:
trunk/Ohana/src/addstar
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/addstar/include/ukirt_uhs.h

    r41341 r42077  
    6464char *iparse_csv_rpt (int *X,    int Nwant, int Nlast, char *line, int *status);
    6565char *jparse_csv_rpt (uint64_t *X, int Nwant, int Nlast, char *line, int *status);
     66
     67float psfQFfromXClass (int xClass);
  • trunk/Ohana/src/addstar/src/FilterStars.c

    r40291 r42077  
    77 * *** bad photFlags
    88 */
     9
     10// As a temporary hack, I am going to overload the following fields with radial aperture values
     11// from the convolved images:
     12
     13# define  F_ApR5_C1 X11_sm_obj
     14# define dF_ApR5_C1  E1_sm_obj
     15# define  F_ApR6_C1 X22_sm_obj
     16# define dF_ApR6_C1  E2_sm_obj
     17# define  F_ApR7_C1 X11_sh_obj
     18# define dF_ApR7_C1  E2_sh_obj
     19
     20# define  F_ApR5_C2 X11_sm_psf
     21# define dF_ApR5_C2  E1_sm_psf
     22# define  F_ApR6_C2 X22_sm_psf
     23# define dF_ApR6_C2  E2_sm_psf
     24# define  F_ApR7_C2 X11_sh_psf
     25# define dF_ApR7_C2  E2_sh_psf
    926
    1027// the imageID supplied here is the sequence **within this set**
     
    133150      if (!isnan(outcat->lensing[N].dF_ApR7)) outcat->lensing[N].dF_ApR7 /= image[0].exptime;
    134151      if (!isnan(outcat->lensing[N].sF_ApR7)) outcat->lensing[N].sF_ApR7 /= image[0].exptime;
     152
     153      // XXX optionall use these overloaded names?
     154      if (!isnan(outcat->lensing[N]. F_ApR5_C1)) outcat->lensing[N]. F_ApR5_C1 /= image[0].exptime;
     155      if (!isnan(outcat->lensing[N].dF_ApR5_C1)) outcat->lensing[N].dF_ApR5_C1 /= image[0].exptime;
     156      if (!isnan(outcat->lensing[N]. F_ApR6_C1)) outcat->lensing[N]. F_ApR6_C1 /= image[0].exptime;
     157      if (!isnan(outcat->lensing[N].dF_ApR6_C1)) outcat->lensing[N].dF_ApR6_C1 /= image[0].exptime;
     158      if (!isnan(outcat->lensing[N]. F_ApR7_C1)) outcat->lensing[N]. F_ApR7_C1 /= image[0].exptime;
     159      if (!isnan(outcat->lensing[N].dF_ApR7_C1)) outcat->lensing[N].dF_ApR7_C1 /= image[0].exptime;
     160
     161      if (!isnan(outcat->lensing[N]. F_ApR5_C2)) outcat->lensing[N]. F_ApR5_C2 /= image[0].exptime;
     162      if (!isnan(outcat->lensing[N].dF_ApR5_C2)) outcat->lensing[N].dF_ApR5_C2 /= image[0].exptime;
     163      if (!isnan(outcat->lensing[N]. F_ApR6_C2)) outcat->lensing[N]. F_ApR6_C2 /= image[0].exptime;
     164      if (!isnan(outcat->lensing[N].dF_ApR6_C2)) outcat->lensing[N].dF_ApR6_C2 /= image[0].exptime;
     165      if (!isnan(outcat->lensing[N]. F_ApR7_C2)) outcat->lensing[N]. F_ApR7_C2 /= image[0].exptime;
     166      if (!isnan(outcat->lensing[N].dF_ApR7_C2)) outcat->lensing[N].dF_ApR7_C2 /= image[0].exptime;
    135167    }
    136168   
  • trunk/Ohana/src/addstar/src/ReadXradFITS.c

    r38654 r42077  
    11# include "addstar.h"
     2
     3// As a temporary hack, I am going to overload the following fields with radial aperture values
     4// from the convolved images:
     5
     6# define  F_ApR5_C1 X11_sm_obj
     7# define dF_ApR5_C1  E1_sm_obj
     8# define  F_ApR6_C1 X22_sm_obj
     9# define dF_ApR6_C1  E2_sm_obj
     10# define  F_ApR7_C1 X11_sh_obj
     11# define dF_ApR7_C1  E2_sh_obj
     12
     13# define  F_ApR5_C2 X11_sm_psf
     14# define dF_ApR5_C2  E1_sm_psf
     15# define  F_ApR6_C2 X22_sm_psf
     16# define dF_ApR6_C2  E2_sm_psf
     17# define  F_ApR7_C2 X11_sh_psf
     18# define dF_ApR7_C2  E2_sh_psf
    219
    320// given a file with the pointer at the start of the table block and the
     
    2441
    2542  // I want to read the following columns from this table:
     43  // All of these fields should have the same number of rows
     44  // the APER_* fields should have the same number of columns (number of radii)
    2645 
    2746  off_t Nrow, NrowAlt;
     
    2948  char type[16], name[80];
    3049
     50  strcpy (name, "IPP_IDET");
     51  int *RadID = gfits_get_bintable_column_data (theader, &table, name, type, &Nrow, &Ncol);
     52  myAssert (!strcmp(type, "int"), "wrong column type for %s\n", name);
     53
     54  strcpy (name, "PSF_FWHM");
     55  float *PSFfwhm = gfits_get_bintable_column_data (theader, &table, name, type, &NrowAlt, &Ncol);
     56  myAssert (!strcmp(type, "float"), "wrong column type for %s\n", name);
     57  myAssert (Nrow == NrowAlt, "row mismatch?");
     58
    3159  strcpy (name, "APER_FLUX");
    32   float *AperFlux = gfits_get_bintable_column_data (theader, &table, name, type, &Nrow, &Ncol);
     60  float *AperFlux = gfits_get_bintable_column_data (theader, &table, name, type, &NrowAlt, &Ncol);
    3361  myAssert (!strcmp(type, "float"), "wrong column type for %s\n", name);
     62  myAssert (Nrow == NrowAlt, "row mismatch?");
     63  fprintf (stderr, "reading APER_FLUX for %d apertures\n", Ncol);
    3464
    3565  strcpy (name, "APER_FLUX_ERR");
    3666  float *AperFluxErr = gfits_get_bintable_column_data (theader, &table, name, type, &NrowAlt, &NcolAlt);
    3767  myAssert (!strcmp(type, "float"), "wrong column type for %s\n", name);
    38   myAssert (Nrow == NrowAlt, "column mismatch?");
     68  myAssert (Nrow == NrowAlt, "row mismatch?");
    3969  myAssert (Ncol == NcolAlt, "column mismatch?");
    4070
     
    4272  float *AperFluxStd = gfits_get_bintable_column_data (theader, &table, name, type, &NrowAlt, &NcolAlt);
    4373  myAssert (!strcmp(type, "float"), "wrong column type for %s\n", name);
    44   myAssert (Nrow == NrowAlt, "column mismatch?");
     74  myAssert (Nrow == NrowAlt, "row mismatch?");
    4575  myAssert (Ncol == NcolAlt, "column mismatch?");
    4676
     
    4878  float *AperFill = gfits_get_bintable_column_data (theader, &table, name, type, &NrowAlt, &NcolAlt);
    4979  myAssert (!strcmp(type, "float"), "wrong column type for %s\n", name);
    50   myAssert (Nrow == NrowAlt, "column mismatch?");
     80  myAssert (Nrow == NrowAlt, "row mismatch?");
    5181  myAssert (Ncol == NcolAlt, "column mismatch?");
    5282
    53   strcpy (name, "IPP_IDET");
    54   int *RadID = gfits_get_bintable_column_data (theader, &table, name, type, &NrowAlt, &NcolAlt);
    55   myAssert (!strcmp(type, "int"), "wrong column type for %s\n", name);
    56   myAssert (Nrow == NrowAlt, "column mismatch?");
     83  // XXX this is not a bug, it is guaranteed since we have 3 convolution targets (raw, 6pix, 8pix)
     84  // if (Nrow > catalog->Nmeasure) {
     85  //   myAbort("more radial measurements than stars?  seems like a bug\n");
     86  // }
    5787
    58   if (Nrow > catalog->Nmeasure) {
    59     myAbort("more radial measurements than stars?  seems like a bug\n");
     88  // myAssert (catalog->lensing, "lensing is not allocated");
     89  // we could allocate here, or just insist this is an error?
     90  if (!catalog->lensing) {
     91    ALLOCATE (catalog->lensing, Lensing, catalog->Nmeasure);
     92    catalog->Nlensing = catalog->Nmeasure;
    6093  }
    6194
    62   myAssert (catalog->lensing, "lensing is not allocated");
    63   // we could allocate here, or just insist this is an error?
    64   // if (!catalog->lensing) {
    65   //   ALLOCATE (catalog->lensing, Lensing, catalog->Nmeasure);
    66   // }
     95  // In the loop below, we need to assign the 3 fwhm values to the three sets of structure
     96  // elements. I believe the sequence is fixed (RAW, C1, C2).  Get the fwhm values from the
     97  // first entry and compare to the rest
     98
     99  float fwhmValues[3];
     100  fwhmValues[0] = PSFfwhm[0];
     101  fwhmValues[1] = PSFfwhm[1];
     102  fwhmValues[2] = PSFfwhm[2];
    67103
    68104  int i;
    69   int Nap = 0;
     105  int Nap = 0; 
    70106  for (i = 0; i < catalog->Nmeasure; i++) {
     107    dvo_lensing_init (&catalog->lensing[i]);
     108
    71109    if (catalog->measure[i].detID < RadID[Nap]) {
    72110      continue;
     
    74112    }
    75113    if (catalog->measure[i].detID > RadID[Nap]) {
    76       myAbort("radial apertures out of order?  seems like a bug\n");
    77       // this would be a radial aperture which does not have a radial aperture
     114      myAbort("radial apertures for source not in psf list? sources out of order?  seems like a bug\n");
     115      // this could be a radial aperture which does not have a PSF source, but that is not possible
    78116    }
    79117
    80     // we assumed we have already set up lensing in ReadStarsFITS.c
     118    // confirm the 3 FWHM values:
     119    myAssert (fwhmValues[0] == PSFfwhm[Nap+0], "FWHM mismatch %f vs %f", fwhmValues[0], PSFfwhm[Nap+0]);
     120    myAssert (fwhmValues[1] == PSFfwhm[Nap+1], "FWHM mismatch %f vs %f", fwhmValues[1], PSFfwhm[Nap+1]);
     121    myAssert (fwhmValues[2] == PSFfwhm[Nap+2], "FWHM mismatch %f vs %f", fwhmValues[2], PSFfwhm[Nap+2]);
    81122
     123    // EAM 2022.02.17 : here is the comment for the PV3 load:
    82124    // XXX this is all hard-wired and should make use of the headers.
    83125    // psphot cmfs have 5 radial apertures:
     
    85127    // SDSS  3, 4, 5, 6, 7
    86128
    87     catalog->lensing[i]. F_ApR5 = AperFlux   [Nap*Ncol + 2];
    88     catalog->lensing[i].dF_ApR5 = AperFluxErr[Nap*Ncol + 2];
    89     catalog->lensing[i].sF_ApR5 = AperFluxStd[Nap*Ncol + 2];
    90     catalog->lensing[i].fF_ApR5 = AperFill   [Nap*Ncol + 2];
     129    // EAM 2022.02.17 : here is the situation for UNIONS DR3:
     130    // we have 3 convolutions (raw, 6", 8")
     131    // for each we have 6 apertures with max radii of (4, 8, 16, 32, 48, 64) pixels = (1, 2, 4, 8, 12, 16) arcsec
     132    // I am going to save (4, 16, 32) which have index of (0, 2, 3)
    91133
    92     catalog->lensing[i]. F_ApR6 = AperFlux   [Nap*Ncol + 3];
    93     catalog->lensing[i].dF_ApR6 = AperFluxErr[Nap*Ncol + 3];
    94     catalog->lensing[i].sF_ApR6 = AperFluxStd[Nap*Ncol + 3];
    95     catalog->lensing[i].fF_ApR6 = AperFill   [Nap*Ncol + 3];
     134    # define RAD_0 0
     135    # define RAD_1 2
     136    # define RAD_2 3
     137    catalog->lensing[i]. F_ApR5    = AperFlux   [(Nap + 0)*Ncol + RAD_0];
     138    catalog->lensing[i].dF_ApR5    = AperFluxErr[(Nap + 0)*Ncol + RAD_0];
     139    catalog->lensing[i].sF_ApR5    = AperFluxStd[(Nap + 0)*Ncol + RAD_0];
     140    catalog->lensing[i].fF_ApR5    = AperFill   [(Nap + 0)*Ncol + RAD_0];
     141                                   
     142    catalog->lensing[i]. F_ApR6    = AperFlux   [(Nap + 0)*Ncol + RAD_1];
     143    catalog->lensing[i].dF_ApR6    = AperFluxErr[(Nap + 0)*Ncol + RAD_1];
     144    catalog->lensing[i].sF_ApR6    = AperFluxStd[(Nap + 0)*Ncol + RAD_1];
     145    catalog->lensing[i].fF_ApR6    = AperFill   [(Nap + 0)*Ncol + RAD_1];
     146                                   
     147    catalog->lensing[i]. F_ApR7    = AperFlux   [(Nap + 0)*Ncol + RAD_2];
     148    catalog->lensing[i].dF_ApR7    = AperFluxErr[(Nap + 0)*Ncol + RAD_2];
     149    catalog->lensing[i].sF_ApR7    = AperFluxStd[(Nap + 0)*Ncol + RAD_2];
     150    catalog->lensing[i].fF_ApR7    = AperFill   [(Nap + 0)*Ncol + RAD_2];
    96151
    97     catalog->lensing[i]. F_ApR7 = AperFlux   [Nap*Ncol + 4];
    98     catalog->lensing[i].dF_ApR7 = AperFluxErr[Nap*Ncol + 4];
    99     catalog->lensing[i].sF_ApR7 = AperFluxStd[Nap*Ncol + 4];
    100     catalog->lensing[i].fF_ApR7 = AperFill   [Nap*Ncol + 4];
    101     Nap ++;
     152    catalog->lensing[i]. F_ApR5_C1 = AperFlux   [(Nap + 1)*Ncol + RAD_0];
     153    catalog->lensing[i].dF_ApR5_C1 = AperFluxErr[(Nap + 1)*Ncol + RAD_0];
     154    catalog->lensing[i]. F_ApR6_C1 = AperFlux   [(Nap + 1)*Ncol + RAD_1];
     155    catalog->lensing[i].dF_ApR6_C1 = AperFluxErr[(Nap + 1)*Ncol + RAD_1];
     156    catalog->lensing[i]. F_ApR7_C1 = AperFlux   [(Nap + 1)*Ncol + RAD_2];
     157    catalog->lensing[i].dF_ApR7_C1 = AperFluxErr[(Nap + 1)*Ncol + RAD_2];
     158
     159    catalog->lensing[i]. F_ApR5_C2 = AperFlux   [(Nap + 2)*Ncol + RAD_0];
     160    catalog->lensing[i].dF_ApR5_C2 = AperFluxErr[(Nap + 2)*Ncol + RAD_0];
     161    catalog->lensing[i]. F_ApR6_C2 = AperFlux   [(Nap + 2)*Ncol + RAD_1];
     162    catalog->lensing[i].dF_ApR6_C2 = AperFluxErr[(Nap + 2)*Ncol + RAD_1];
     163    catalog->lensing[i]. F_ApR7_C2 = AperFlux   [(Nap + 2)*Ncol + RAD_2];
     164    catalog->lensing[i].dF_ApR7_C2 = AperFluxErr[(Nap + 2)*Ncol + RAD_2];
     165
     166    catalog->lensing[i].detID = catalog->measure[i].detID;
     167
     168    // XXX set the measure, object, etc ID values here
     169    // catalog->lensing[i].objID : set in find_matches_closest.c
     170    // catalog->lensing[i].catID : set in find_matches_closest.c
     171    // catalog->lensing[i].averef : set in find_matches_closest.c
     172    // catalog->lensing[i].imageID : set in FilterStars.c and UpdateImageIDs.c
     173
     174    Nap += 3;
    102175  }
    103176  myAssert (Nap == Nrow, "did we go too far???");
     
    108181  free (AperFluxStd);
    109182  free (AperFill);
     183  free (PSFfwhm);
    110184  free (RadID);
    111185
  • trunk/Ohana/src/addstar/src/loadukirt_uhs_readstars.c

    r41341 r42077  
    4545}
    4646
     47float psfQFfromXClass (int xClass) {
     48
     49  float value = NAN;
     50  switch (xClass) {
     51    case -1: value = 0.99; break; // star
     52    case -2: value = 0.90; break; // probable star
     53    case -3: value = 0.40; break; // probable galaxy
     54    case +1: value = 0.20; break; // galaxy
     55    case  0: value = 0.10; break; // noise
     56    default: break;
     57  }
     58
     59  return value;
     60}
     61
  • trunk/Ohana/src/addstar/src/loadukirt_uhs_readstars_ugcs.c

    r41341 r42077  
    605605    stars[Nstars].measure[0].Mkron      = yAperMag4[i];
    606606    stars[Nstars].measure[0].dMkron     = yAperMag4Err[i];
    607     stars[Nstars].measure[0].posangle   = yPA[i]; // XXX units
    608     stars[Nstars].measure[0].psfQF      = yClass[i];
     607    stars[Nstars].measure[0].posangle   = ToShortDegrees(yPA[i]); // XXX units
     608    stars[Nstars].measure[0].psfQF      = psfQFfromXClass(yClass[i]);
    609609    stars[Nstars].measure[0].photFlags  = yppErrBits[i];
    610610    stars[Nstars].measure[0].photFlags2 = photFlags2;
     
    625625    stars[Nstars].measure[1].Mkron      = zAperMag4[i];
    626626    stars[Nstars].measure[1].dMkron     = zAperMag4Err[i];
    627     stars[Nstars].measure[1].posangle   = zPA[i]; // XXX units
    628     stars[Nstars].measure[1].psfQF      = zClass[i];
     627    stars[Nstars].measure[1].posangle   = ToShortDegrees(zPA[i]); // XXX units
     628    stars[Nstars].measure[1].psfQF      = psfQFfromXClass(zClass[i]);
    629629    stars[Nstars].measure[1].photFlags  = zppErrBits[i];
    630630    stars[Nstars].measure[1].photFlags2 = photFlags2;
     
    645645    stars[Nstars].measure[2].Mkron      = jAperMag4[i];
    646646    stars[Nstars].measure[2].dMkron     = jAperMag4Err[i];
    647     stars[Nstars].measure[2].posangle   = jPA[i]; // XXX units
    648     stars[Nstars].measure[2].psfQF      = jClass[i];
     647    stars[Nstars].measure[2].posangle   = ToShortDegrees(jPA[i]); // XXX units
     648    stars[Nstars].measure[2].psfQF      = psfQFfromXClass(jClass[i]);
    649649    stars[Nstars].measure[2].photFlags  = jppErrBits[i];
    650650    stars[Nstars].measure[2].photFlags2 = photFlags2;
     
    665665    stars[Nstars].measure[3].Mkron      = hAperMag4[i];
    666666    stars[Nstars].measure[3].dMkron     = hAperMag4Err[i];
    667     stars[Nstars].measure[3].posangle   = hPA[i]; // XXX units
    668     stars[Nstars].measure[3].psfQF      = hClass[i];
     667    stars[Nstars].measure[3].posangle   = ToShortDegrees(hPA[i]); // XXX units
     668    stars[Nstars].measure[3].psfQF      = psfQFfromXClass(hClass[i]);
    669669    stars[Nstars].measure[3].photFlags  = hppErrBits[i];
    670670    stars[Nstars].measure[3].photFlags2 = photFlags2;
     
    685685    stars[Nstars].measure[4].Mkron      = k1AperMag4[i];
    686686    stars[Nstars].measure[4].dMkron     = k1AperMag4Err[i];
    687     stars[Nstars].measure[4].posangle   = k1PA[i]; // XXX units
    688     stars[Nstars].measure[4].psfQF      = k1Class[i];
     687    stars[Nstars].measure[4].posangle   = ToShortDegrees(k1PA[i]); // XXX units
     688    stars[Nstars].measure[4].psfQF      = psfQFfromXClass(k1Class[i]);
    689689    stars[Nstars].measure[4].photFlags  = k1ppErrBits[i];
    690690    stars[Nstars].measure[4].photFlags2 = photFlags2;
     
    705705    stars[Nstars].measure[5].Mkron      = k2AperMag4[i];
    706706    stars[Nstars].measure[5].dMkron     = k2AperMag4Err[i];
    707     stars[Nstars].measure[5].posangle   = k2PA[i]; // XXX units
    708     stars[Nstars].measure[5].psfQF      = k2Class[i];
     707    stars[Nstars].measure[5].posangle   = ToShortDegrees(k2PA[i]); // XXX units
     708    stars[Nstars].measure[5].psfQF      = psfQFfromXClass(k2Class[i]);
    709709    stars[Nstars].measure[5].photFlags  = k2ppErrBits[i];
    710710    stars[Nstars].measure[5].photFlags2 = photFlags2;
  • trunk/Ohana/src/addstar/src/loadukirt_uhs_readstars_ugps.c

    r41341 r42077  
    516516    stars[Nstars].measure[0].Mkron      = jAperMag4[i];
    517517    stars[Nstars].measure[0].dMkron     = jAperMag4Err[i];
    518     stars[Nstars].measure[0].posangle   = jPA[i]; // XXX units
    519     stars[Nstars].measure[0].psfQF      = jClass[i];
     518    stars[Nstars].measure[0].posangle   = ToShortDegrees(jPA[i]); // XXX units
     519    stars[Nstars].measure[0].psfQF      = psfQFfromXClass(jClass[i]);
    520520    stars[Nstars].measure[0].photFlags  = jppErrBits[i];
    521521    stars[Nstars].measure[0].photFlags2 = photFlags2;
     
    536536    stars[Nstars].measure[1].Mkron      = hAperMag4[i];
    537537    stars[Nstars].measure[1].dMkron     = hAperMag4Err[i];
    538     stars[Nstars].measure[1].posangle   = hPA[i]; // XXX units
    539     stars[Nstars].measure[1].psfQF      = hClass[i];
     538    stars[Nstars].measure[1].posangle   = ToShortDegrees(hPA[i]); // XXX units
     539    stars[Nstars].measure[1].psfQF      = psfQFfromXClass(hClass[i]);
    540540    stars[Nstars].measure[1].photFlags  = hppErrBits[i];
    541541    stars[Nstars].measure[1].photFlags2 = photFlags2;
     
    556556    stars[Nstars].measure[2].Mkron      = k1AperMag4[i];
    557557    stars[Nstars].measure[2].dMkron     = k1AperMag4Err[i];
    558     stars[Nstars].measure[2].posangle   = k1PA[i]; // XXX units
    559     stars[Nstars].measure[2].psfQF      = k1Class[i];
     558    stars[Nstars].measure[2].posangle   = ToShortDegrees(k1PA[i]); // XXX units
     559    stars[Nstars].measure[2].psfQF      = psfQFfromXClass(k1Class[i]);
    560560    stars[Nstars].measure[2].photFlags  = k1ppErrBits[i];
    561561    stars[Nstars].measure[2].photFlags2 = photFlags2;
     
    576576    stars[Nstars].measure[3].Mkron      = k2AperMag4[i];
    577577    stars[Nstars].measure[3].dMkron     = k2AperMag4Err[i];
    578     stars[Nstars].measure[3].posangle   = k2PA[i]; // XXX units
    579     stars[Nstars].measure[3].psfQF      = k2Class[i];
     578    stars[Nstars].measure[3].posangle   = ToShortDegrees(k2PA[i]); // XXX units
     579    stars[Nstars].measure[3].psfQF      = psfQFfromXClass(k2Class[i]);
    580580    stars[Nstars].measure[3].photFlags  = k2ppErrBits[i];
    581581    stars[Nstars].measure[3].photFlags2 = photFlags2;
     
    596596    stars[Nstars].measure[4].Mkron      = h2AperMag4[i];
    597597    stars[Nstars].measure[4].dMkron     = h2AperMag4Err[i];
    598     stars[Nstars].measure[4].posangle   = h2PA[i]; // XXX units
    599     stars[Nstars].measure[4].psfQF      = h2Class[i];
     598    stars[Nstars].measure[4].posangle   = ToShortDegrees(h2PA[i]); // XXX units
     599    stars[Nstars].measure[4].psfQF      = psfQFfromXClass(h2Class[i]);
    600600    stars[Nstars].measure[4].photFlags  = h2ppErrBits[i];
    601601    stars[Nstars].measure[4].photFlags2 = photFlags2;
  • trunk/Ohana/src/addstar/src/loadukirt_uhs_readstars_uhs.c

    r41341 r42077  
    297297    stars[Nstars].measure[0].Mkron      = jAperMag4[i];
    298298    stars[Nstars].measure[0].dMkron     = jAperMag4Err[i];
    299     stars[Nstars].measure[0].posangle   = jPA[i]; // XXX units
    300     stars[Nstars].measure[0].psfQF      = jClass[i];
     299    stars[Nstars].measure[0].posangle   = ToShortDegrees(jPA[i]); // jPA is in degrees, posangle is short
     300    stars[Nstars].measure[0].psfQF      = psfQFfromXClass(jClass[i]);
    301301    stars[Nstars].measure[0].photFlags  = jppErrBits[i];
    302302    stars[Nstars].measure[0].photFlags2 = photFlags2;
  • trunk/Ohana/src/addstar/src/loadukirt_uhs_readstars_ulas.c

    r41341 r42077  
    543543    stars[Nstars].measure[0].Mkron      = yAperMag4[i];
    544544    stars[Nstars].measure[0].dMkron     = yAperMag4Err[i];
    545     stars[Nstars].measure[0].posangle   = yPA[i]; // XXX units
    546     stars[Nstars].measure[0].psfQF      = yClass[i];
     545    stars[Nstars].measure[0].posangle   = ToShortDegrees(yPA[i]); // XXX units
     546    stars[Nstars].measure[0].psfQF      = psfQFfromXClass(yClass[i]);
    547547    stars[Nstars].measure[0].photFlags  = yppErrBits[i];
    548548    stars[Nstars].measure[0].photFlags2 = photFlags2;
     
    563563    stars[Nstars].measure[1].Mkron      = j1AperMag4[i];
    564564    stars[Nstars].measure[1].dMkron     = j1AperMag4Err[i];
    565     stars[Nstars].measure[1].posangle   = j1PA[i]; // XXX units
    566     stars[Nstars].measure[1].psfQF      = j1Class[i];
     565    stars[Nstars].measure[1].posangle   = ToShortDegrees(j1PA[i]); // XXX units
     566    stars[Nstars].measure[1].psfQF      = psfQFfromXClass(j1Class[i]);
    567567    stars[Nstars].measure[1].photFlags  = j1ppErrBits[i];
    568568    stars[Nstars].measure[1].photFlags2 = photFlags2;
     
    583583    stars[Nstars].measure[2].Mkron      = j2AperMag4[i];
    584584    stars[Nstars].measure[2].dMkron     = j2AperMag4Err[i];
    585     stars[Nstars].measure[2].posangle   = j2PA[i]; // XXX units
    586     stars[Nstars].measure[2].psfQF      = j2Class[i];
     585    stars[Nstars].measure[2].posangle   = ToShortDegrees(j2PA[i]); // XXX units
     586    stars[Nstars].measure[2].psfQF      = psfQFfromXClass(j2Class[i]);
    587587    stars[Nstars].measure[2].photFlags  = j2ppErrBits[i];
    588588    stars[Nstars].measure[2].photFlags2 = photFlags2;
     
    603603    stars[Nstars].measure[3].Mkron      = hAperMag4[i];
    604604    stars[Nstars].measure[3].dMkron     = hAperMag4Err[i];
    605     stars[Nstars].measure[3].posangle   = hPA[i]; // XXX units
    606     stars[Nstars].measure[3].psfQF      = hClass[i];
     605    stars[Nstars].measure[3].posangle   = ToShortDegrees(hPA[i]); // XXX units
     606    stars[Nstars].measure[3].psfQF      = psfQFfromXClass(hClass[i]);
    607607    stars[Nstars].measure[3].photFlags  = hppErrBits[i];
    608608    stars[Nstars].measure[3].photFlags2 = photFlags2;
     
    623623    stars[Nstars].measure[4].Mkron      = kAperMag4[i];
    624624    stars[Nstars].measure[4].dMkron     = kAperMag4Err[i];
    625     stars[Nstars].measure[4].posangle   = kPA[i]; // XXX units
    626     stars[Nstars].measure[4].psfQF      = kClass[i];
     625    stars[Nstars].measure[4].posangle   = ToShortDegrees(kPA[i]); // XXX units
     626    stars[Nstars].measure[4].psfQF      = psfQFfromXClass(kClass[i]);
    627627    stars[Nstars].measure[4].photFlags  = kppErrBits[i];
    628628    stars[Nstars].measure[4].photFlags2 = photFlags2;
Note: See TracChangeset for help on using the changeset viewer.