IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 30656


Ignore:
Timestamp:
Feb 16, 2011, 4:11:29 PM (15 years ago)
Author:
Serge CHASTEL
Message:

Implicit conversion fixes

Location:
trunk/ppTranslate/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/ppTranslate/src/ppMonet.c

    r25925 r30656  
    146146            psU32 flags = psMetadataLookupU32(NULL, row, "FLAGS");
    147147
    148             float width = 0.5 * (major + minor);
     148            float width = (float) (0.5 * (major + minor));
    149149
    150150            gzprintf(gz, "%s , %.2f , %.2f , %.8lf , %.8lf , %.3f , %.3f , %.2f , %#08x\n",
  • trunk/ppTranslate/src/ppMopsMerge.c

    r30629 r30656  
    2222    )
    2323{
    24     float dx = detections->x->data.F32[index] - detections->naxis1->data.S32[index] / 2.0;
    25     float dy = detections->y->data.F32[index] - detections->naxis2->data.S32[index] / 2.0;
    26     return PS_SQR(dx) + PS_SQR(dy);
     24  float dx = (float) (detections->x->data.F32[index] - detections->naxis1->data.S32[index] / 2.0);
     25  float dy = (float) (detections->y->data.F32[index] - detections->naxis2->data.S32[index] / 2.0);
     26  return PS_SQR(dx) + PS_SQR(dy);
    2727}
    2828
     
    170170    psTrace("ppMops.merge", 2, "%ld sources in merged detections list\n", merged->num);
    171171
    172     merged->seeing /= num;
     172    merged->seeing /= (float) num;
    173173
    174174    return merged;
  • trunk/ppTranslate/src/ppMopsRead.c

    r29565 r30656  
    4545        if (args->version == 0) {
    4646          psTrace("ppMops.read", 1, "Changing args->version to %d\n", skyChipPsfVersion);
    47           args->version = skyChipPsfVersion;
     47          args->version = (unsigned short) skyChipPsfVersion;
    4848        }
    4949        if (skyChipPsfVersion == 0) {
     
    8787        det->mjd = psMetadataLookupF64(NULL, header, "MJD-OBS") + det->exptime / 2.0 / 3600 / 24;
    8888
    89         det->seeing = 0.5 * (psMetadataLookupF32(NULL, header, "FWHM_MAJ") +
    90                              psMetadataLookupF32(NULL, header, "FWHM_MIN"));
     89        det->seeing = (float) 0.5 * (psMetadataLookupF32(NULL, header, "FWHM_MAJ") +
     90                                     psMetadataLookupF32(NULL, header, "FWHM_MIN"));
    9191
    9292        int naxis1 = psMetadataLookupS32(NULL, header, "IMNAXIS1"); // Number of columns
     
    145145              //Values are set only if the version is 2
    146146              if (skyChipPsfVersion == 2) {
    147                 det->psfInstFlux->data.F32[numGood] = psMetadataLookupS32(NULL, row, "PSF_INST_FLUX");
    148                 det->psfInstFluxSig->data.F32[numGood] = psMetadataLookupS32(NULL, row, "PSF_INST_FLUX_SIG");
    149                 det->apMag->data.F32[numGood] = psMetadataLookupS32(NULL, row, "AP_MAG");
    150                 det->apMagRaw->data.F32[numGood] = psMetadataLookupS32(NULL, row, "AP_MAG_RAW");
    151                 det->apMagRadius->data.F32[numGood] = psMetadataLookupS32(NULL, row, "AP_MAG_RADIUS");
    152                 det->apFlux->data.F32[numGood] = psMetadataLookupS32(NULL, row, "AP_FLUX");
    153                 det->apFluxSig->data.F32[numGood] = psMetadataLookupS32(NULL, row, "AP_FLUX_SIG");
    154                 det->peakFluxAsMag->data.F32[numGood] = psMetadataLookupS32(NULL, row, "PEAK_FLUX_AS_MAG");
    155                 det->calPsfMag->data.F32[numGood] = psMetadataLookupS32(NULL, row, "CAL_PSF_MAG");
    156                 det->calPsfMagSig->data.F32[numGood] = psMetadataLookupS32(NULL, row, "CAL_PSF_MAG_SIG");
    157                 det->sky->data.F32[numGood] = psMetadataLookupS32(NULL, row, "SKY");
    158                 det->skySig->data.F32[numGood] = psMetadataLookupS32(NULL, row, "SKY_SIGMA");
     147                det->psfInstFlux->data.F32[numGood] = psMetadataLookupF32(NULL, row, "PSF_INST_FLUX");
     148                det->psfInstFluxSig->data.F32[numGood] = psMetadataLookupF32(NULL, row, "PSF_INST_FLUX_SIG");
     149                det->apMag->data.F32[numGood] = psMetadataLookupF32(NULL, row, "AP_MAG");
     150                det->apMagRaw->data.F32[numGood] = psMetadataLookupF32(NULL, row, "AP_MAG_RAW");
     151                det->apMagRadius->data.F32[numGood] = psMetadataLookupF32(NULL, row, "AP_MAG_RADIUS");
     152                det->apFlux->data.F32[numGood] = psMetadataLookupF32(NULL, row, "AP_FLUX");
     153                det->apFluxSig->data.F32[numGood] = psMetadataLookupF32(NULL, row, "AP_FLUX_SIG");
     154                det->peakFluxAsMag->data.F32[numGood] = psMetadataLookupF32(NULL, row, "PEAK_FLUX_AS_MAG");
     155                det->calPsfMag->data.F32[numGood] = psMetadataLookupF32(NULL, row, "CAL_PSF_MAG");
     156                det->calPsfMagSig->data.F32[numGood] = psMetadataLookupF32(NULL, row, "CAL_PSF_MAG_SIG");
     157                det->sky->data.F32[numGood] = psMetadataLookupF32(NULL, row, "SKY");
     158                det->skySig->data.F32[numGood] = psMetadataLookupF32(NULL, row, "SKY_SIGMA");
    159159                det->qualityPerfect->data.F32[numGood] = psMetadataLookupF32(NULL, row, "PSF_QF_PERFECT");
    160160                det->momentsR1->data.F32[numGood] = psMetadataLookupF32(NULL, row, "MOMENTS_R1");
     
    236236            numGood++;
    237237        }
    238         det->seeing *= plateScale / numGood;
     238        det->seeing *= ((float) plateScale) / ((float) numGood);
    239239
    240240        det->x->n = numGood;
Note: See TracChangeset for help on using the changeset viewer.