IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 23, 2015, 10:15:49 AM (11 years ago)
Author:
eugene
Message:

adding dvo elements for E1,E2_psf

Location:
trunk/Ohana/src/libdvo
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/libdvo/include/ps1_v5_defs.h

    r37807 r37995  
    88SecFilt_PS1_V5          *SecFiltInternalTo_PS1_V5 (SecFilt *in, off_t Nvalues);
    99
     10typedef Lensing_PS1_V5_R2 Lensing_PS1_V5;
     11
    1012Lensing                 *Lensing_PS1_V5_ToInternal (Lensing_PS1_V5 *in, off_t Nvalues);
    11 Lensing                 *Lensing_PS1_V5_ALT_ToInternal (Lensing_PS1_V5_ALT *in, off_t Nvalues);
    12 Lensing_PS1_V5          *LensingInternalTo_PS1_V5 (Lensing *in, off_t Nvalues);
     13Lensing_PS1_V5_R2       *LensingInternalTo_PS1_V5_R2 (Lensing *in, off_t Nvalues);
    1314Lensobj                 *Lensobj_PS1_V5_ToInternal (Lensobj_PS1_V5 *in, off_t Nvalues);
    1415Lensobj_PS1_V5          *LensobjInternalTo_PS1_V5 (Lensobj *in, off_t Nvalues);
     16
     17Lensing                 *Lensing_PS1_V5_R0_ToInternal (Lensing_PS1_V5_R0 *in, off_t Nvalues);
     18Lensing                 *Lensing_PS1_V5_R1_ToInternal (Lensing_PS1_V5_R1 *in, off_t Nvalues);
     19Lensing                 *Lensing_PS1_V5_R2_ToInternal (Lensing_PS1_V5_R2 *in, off_t Nvalues);
    1520
    1621StarPar                 *StarPar_PS1_V5_ToInternal (StarPar_PS1_V5 *in, off_t Nvalues);
  • trunk/Ohana/src/libdvo/src/dvo_catalog.c

    r37807 r37995  
    377377  lensing->E1_sh_psf  = NAN;
    378378  lensing->E2_sh_psf  = NAN;
     379
     380  lensing->E1_psf     = NAN;
     381  lensing->E2_psf     = NAN;
    379382
    380383  lensing->F_ApR5     = NAN;
  • trunk/Ohana/src/libdvo/src/dvo_convert.c

    r37807 r37995  
    416416
    417417  if (!strcmp (extname, "DVO_LENSING_PS1_V5") && (ftable[0].header[0].Naxis[0] == 128)) {
    418     Lensing_PS1_V5_ALT *tmpLensing;                                             
    419     tmpLensing = gfits_table_get_Lensing_PS1_V5_ALT (ftable, Nlensing, NULL);
     418    Lensing_PS1_V5_R0 *tmpLensing;                                             
     419    tmpLensing = gfits_table_get_Lensing_PS1_V5_R0 (ftable, Nlensing, NULL);
    420420    if (!tmpLensing) {                                                 
    421421      fprintf (stderr, "ERROR: failed to read lensings\n");             
    422422      exit (2);                                                         
    423423    }                                                                   
    424     lensing = Lensing_PS1_V5_ALT_ToInternal (tmpLensing, *Nlensing);
     424    lensing = Lensing_PS1_V5_R0_ToInternal (tmpLensing, *Nlensing);
     425    free (tmpLensing);                                                 
     426    *format = DVO_FORMAT_PS1_V5;                                       
     427    return (lensing); }
     428
     429  if (!strcmp (extname, "DVO_LENSING_PS1_V5") && (ftable[0].header[0].Naxis[0] == 136)) {
     430    Lensing_PS1_V5_R1 *tmpLensing;                                             
     431    tmpLensing = gfits_table_get_Lensing_PS1_V5_R1 (ftable, Nlensing, NULL);
     432    if (!tmpLensing) {                                                 
     433      fprintf (stderr, "ERROR: failed to read lensings\n");             
     434      exit (2);                                                         
     435    }                                                                   
     436    lensing = Lensing_PS1_V5_R1_ToInternal (tmpLensing, *Nlensing);
    425437    free (tmpLensing);                                                 
    426438    *format = DVO_FORMAT_PS1_V5;                                       
     
    468480  SKIPPING_FORMAT ("DVO_LENSING_PS1_V3",          PS1_V3,          PS1_V3);
    469481  SKIPPING_FORMAT ("DVO_LENSING_PS1_V4",          PS1_V4,          PS1_V4);
    470   CONVERT_FORMAT  ("DVO_LENSING_PS1_V5",          PS1_V5,          PS1_V5);
     482  CONVERT_FORMAT  ("DVO_LENSING_PS1_V5",          PS1_V5,          PS1_V5_R2);
    471483# undef CONVERT_FORMAT
    472484
     
    505517//    FORMAT_CASE (PS1_V3,          PS1_V3);
    506518//    FORMAT_CASE (PS1_V4,          PS1_V4);
    507       FORMAT_CASE (PS1_V5,          PS1_V5);
     519      FORMAT_CASE (PS1_V5,          PS1_V5_R2);
    508520# undef FORMAT_CASE
    509521
  • trunk/Ohana/src/libdvo/src/dvo_convert_PS1_V5.c

    r37992 r37995  
    444444}
    445445
    446 Lensing *Lensing_PS1_V5_ToInternal (Lensing_PS1_V5 *in, off_t Nvalues) {
     446Lensing *Lensing_PS1_V5_R2_ToInternal (Lensing_PS1_V5_R2 *in, off_t Nvalues) {
    447447
    448448  off_t i;
     
    477477    out[i].E1_sh_psf   = in[i].E1_sh_psf;
    478478    out[i].E2_sh_psf   = in[i].E2_sh_psf;
     479
     480    out[i].E1_psf      = in[i].E1_psf;
     481    out[i].E2_psf      = in[i].E2_psf;
    479482
    480483    out[i].F_ApR5      = in[i].F_ApR5;
     
    491494    out[i].objID       = in[i].objID;
    492495    out[i].catID       = in[i].catID;
    493 
    494496    out[i].averef      = in[i].averef;
    495497
     
    499501}
    500502
    501 Lensing_PS1_V5 *LensingInternalTo_PS1_V5 (Lensing *in, off_t Nvalues) {
    502 
    503   off_t i;
    504   Lensing_PS1_V5 *out;
     503Lensing_PS1_V5_R2 *LensingInternalTo_PS1_V5_R2 (Lensing *in, off_t Nvalues) {
     504
     505  off_t i;
     506  Lensing_PS1_V5_R2 *out;
    505507
    506508  ALLOCATE_ZERO (out, Lensing_PS1_V5, Nvalues);
     
    548550    out[i].objID       = in[i].objID;
    549551    out[i].catID       = in[i].catID;
    550 
    551552    out[i].averef      = in[i].averef;
     553
    552554    out[i].imageID     = in[i].imageID;
    553555  }
     
    583585    out[i].E2_sm_psf   = in[i].E2_sm_psf;     
    584586                                         
    585     out[i].E1_psf      = in[i].E1_psf;
    586     out[i].E2_psf      = in[i].E2_psf;     
    587 
    588587    out[i].X11_sh_psf  = in[i].X11_sh_psf;
    589588    out[i].X12_sh_psf  = in[i].X12_sh_psf;
     
    13171316    out[i].objID       = in[i].objID;
    13181317    out[i].catID       = in[i].catID;
    1319 
    13201318    out[i].averef      = in[i].averef;
    13211319  }
     
    13701368    out[i].objID       = in[i].objID;
    13711369    out[i].catID       = in[i].catID;
    1372 
    13731370    out[i].averef      = in[i].averef;
    1374   }
    1375   return (out);
    1376 }
    1377 
     1371
     1372    out[i].imageID     = in[i].imageID;
     1373  }
     1374  return (out);
     1375}
     1376
Note: See TracChangeset for help on using the changeset viewer.