IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 13, 2011, 11:13:37 AM (15 years ago)
Author:
eugene
Message:

zero out all dvo I/O buffers before converting formats; adding fields to track calibration accuracy ( dXpixSys, dMagSys, and related ) -- these replace existing but unused fields Mxx...Myyyy in images, and replace dummy padding in measure-ps1-v2 ; invalidate old photfits functions ( to be replaced with a map if needed )

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/libdvo/src/dvo_convert_PS1_DEV_2.c

    r27580 r30605  
    88  Measure *out;
    99
    10   ALLOCATE (out, Measure, Nvalues);
     10  ALLOCATE_ZERO (out, Measure, Nvalues);
    1111
    1212  for (i = 0; i < Nvalues; i++) {
     
    6363  Measure_PS1_DEV_2 *out;
    6464
    65   ALLOCATE (out, Measure_PS1_DEV_2, Nvalues);
     65  ALLOCATE_ZERO (out, Measure_PS1_DEV_2, Nvalues);
    6666
    6767  for (i = 0; i < Nvalues; i++) {
     
    109109  Average *out;
    110110
    111   ALLOCATE (out, Average, Nvalues);
     111  ALLOCATE_ZERO (out, Average, Nvalues);
    112112
    113113  for (i = 0; i < Nvalues; i++) {
     
    151151  Average_PS1_DEV_2 *out;
    152152
    153   ALLOCATE (out, Average_PS1_DEV_2, Nvalues);
     153  ALLOCATE_ZERO (out, Average_PS1_DEV_2, Nvalues);
    154154
    155155  for (i = 0; i < Nvalues; i++) {
     
    185185  SecFilt *out;
    186186
    187   ALLOCATE (out, SecFilt, Nvalues);
     187  ALLOCATE_ZERO (out, SecFilt, Nvalues);
    188188
    189189  for (i = 0; i < Nvalues; i++) {
     
    209209  SecFilt_PS1_DEV_2 *out;
    210210
    211   ALLOCATE (out, SecFilt_PS1_DEV_2, Nvalues);
     211  ALLOCATE_ZERO (out, SecFilt_PS1_DEV_2, Nvalues);
    212212
    213213  for (i = 0; i < Nvalues; i++) {
     
    226226  Image *out;
    227227
    228   ALLOCATE (out, Image, Nvalues);
     228  ALLOCATE_ZERO (out, Image, Nvalues);
    229229
    230230  for (i = 0; i < Nvalues; i++) {
     
    259259    out[i].sourceID         = in[i].sourceID;
    260260
    261     out[i].order            = in[i].order;
    262     out[i].Mx               = in[i].Mx;
    263     out[i].My               = in[i].My;
    264     out[i].Mxx              = in[i].Mxx;
    265     out[i].Mxy              = in[i].Mxy;
    266     out[i].Myy              = in[i].Myy;
    267     out[i].Mxxx             = in[i].Mxxx;
    268     out[i].Mxxy             = in[i].Mxxy;
    269     out[i].Mxyy             = in[i].Mxyy;
    270     out[i].Myyy             = in[i].Myyy;
    271     out[i].Mxxxx            = in[i].Mxxxx;
    272     out[i].Mxxxy            = in[i].Mxxxy;
    273     out[i].Mxxyy            = in[i].Mxxyy;
    274     out[i].Mxyyy            = in[i].Mxyyy;
    275     out[i].Myyyy            = in[i].Myyyy;
     261    // as of 2011.02.03, the old Mx,My,..., Mxxxx,Myyyy have been deprecated and replaced
     262    // with the following.  (no real databases used those values -- see
     263    // libdvo/doc/dvo-images.txt)
     264    out[i].nLinkAstrom      = in[i].nLinkAstrom;
     265    out[i].nLinkPhotom      = in[i].nLinkPhotom;
     266    out[i].dummy3           = in[i].dummy3;
     267    out[i].dXpixSys         = in[i].dXpixSys;
     268    out[i].dYpixSys         = in[i].dYpixSys;
     269    out[i].dMagSys          = in[i].dMagSys;
     270    out[i].nFitAstrom       = in[i].nFitAstrom;
     271    out[i].nFitPhotom       = in[i].nFitPhotom;
     272    out[i].photom_map_id    = in[i].photom_map_id;
     273    out[i].astrom_map_id    = in[i].astrom_map_id;
    276274
    277275    // changed or added for PS1_V1
     
    292290  Image_PS1_DEV_2 *out;
    293291
    294   ALLOCATE (out, Image_PS1_DEV_2, Nvalues);
     292  ALLOCATE_ZERO (out, Image_PS1_DEV_2, Nvalues);
    295293
    296294  for (i = 0; i < Nvalues; i++) {
     
    326324    out[i].sourceID         = in[i].sourceID;
    327325
    328     out[i].order            = in[i].order;
    329     out[i].Mx               = in[i].Mx;
    330     out[i].My               = in[i].My;
    331     out[i].Mxx              = in[i].Mxx;
    332     out[i].Mxy              = in[i].Mxy;
    333     out[i].Myy              = in[i].Myy;
    334     out[i].Mxxx             = in[i].Mxxx;
    335     out[i].Mxxy             = in[i].Mxxy;
    336     out[i].Mxyy             = in[i].Mxyy;
    337     out[i].Myyy             = in[i].Myyy;
    338     out[i].Mxxxx            = in[i].Mxxxx;
    339     out[i].Mxxxy            = in[i].Mxxxy;
    340     out[i].Mxxyy            = in[i].Mxxyy;
    341     out[i].Mxyyy            = in[i].Mxyyy;
    342     out[i].Myyyy            = in[i].Myyyy;
     326    // as of 2011.02.03, the old Mx,My,..., Mxxxx,Myyyy have been deprecated and replaced
     327    // with the following.  (no real databases used those values -- see
     328    // libdvo/doc/dvo-images.txt)
     329    out[i].nLinkAstrom      = in[i].nLinkAstrom;
     330    out[i].nLinkPhotom      = in[i].nLinkPhotom;
     331    out[i].dummy3           = in[i].dummy3;
     332    out[i].dXpixSys         = in[i].dXpixSys;
     333    out[i].dYpixSys         = in[i].dYpixSys;
     334    out[i].dMagSys          = in[i].dMagSys;
     335    out[i].nFitAstrom       = in[i].nFitAstrom;
     336    out[i].nFitPhotom       = in[i].nFitPhotom;
     337    out[i].photom_map_id    = in[i].photom_map_id;
     338    out[i].astrom_map_id    = in[i].astrom_map_id;
    343339
    344340    // changed or added for PS1_V1
     
    353349  PhotCode *out;
    354350
    355   ALLOCATE (out, PhotCode, Nvalues);
     351  ALLOCATE_ZERO (out, PhotCode, Nvalues);
    356352
    357353  for (i = 0; i < Nvalues; i++) {
     
    390386  PhotCode_PS1_DEV_2 *out;
    391387
    392   ALLOCATE (out, PhotCode_PS1_DEV_2, Nvalues);
     388  ALLOCATE_ZERO (out, PhotCode_PS1_DEV_2, Nvalues);
    393389
    394390  for (i = 0; i < Nvalues; i++) {
Note: See TracChangeset for help on using the changeset viewer.