- Timestamp:
- Apr 26, 2013, 9:07:23 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20130419/pswarp/src/pswarpOverlaps.c
r35424 r35434 83 83 } 84 84 } 85 fprintf (stderr, "bounds %d : %f - %f, %f - %f\n", view->chip, Pmin, Pmax, Qmin, Qmax); 85 86 pswarpBoundsAppend (bounds, Pmin, Pmax, Qmin, Qmax); 86 87 } … … 109 110 pmFPAview *view = pmFPAviewAlloc (0); 110 111 112 // we are looping over the chips of the OUTPUT fpa. chip->file_exists is false for all chips. 113 // at this point, I cannot exclude any of these chips (I do not know which output chips will not be created). 114 // NOTE : I either have to use SKYCELL fpa and ensure SKYCELL->chip->toFPA exists or grab hdu from SKYCELL 115 111 116 pmChip *chip = NULL; 112 117 while ((chip = pmFPAviewNextChip (view, fpa, 1)) != NULL) { 113 118 psTrace ("pswarp", 4, "Chip %d: %x %x\n", view->chip, chip->file_exists, chip->process); 114 if (!chip->process || !chip->file_exists) { continue; } 119 // if (!chip->file_exists) { continue; } // this fpa refers to the output file, so no chip exist 120 assert (chip->toFPA); 121 chip->process = true; // start with process true, we will de-activate later (pswarpFindOverlaps) 115 122 116 123 // we've got the output astrom header … … 153 160 double Dmid = stats->sampleMean; 154 161 155 psProjection *frame = psProjectionAlloc (Rmid, Dmid, 1.0, 1.0, PS_PROJ_TAN);162 psProjection *frame = psProjectionAlloc (Rmid, Dmid, PS_RAD_DEG/3600.0, PS_RAD_DEG/3600.0, PS_PROJ_TAN); 156 163 return frame; 157 164 } … … 162 169 // elements overlap it. 163 170 164 pmFPAview *view = pmFPAviewAlloc (0);171 assert (fpa->chips->n == tgt->Pmin->n); 165 172 166 pmChip *chip = NULL; 167 int Nout = 0; 168 while ((chip = pmFPAviewNextChip (view, fpa, 1)) != NULL) { 169 psTrace ("pswarp", 4, "Chip %d: %x %x\n", view->chip, chip->file_exists, chip->process); 170 if (!chip->process || !chip->file_exists) { continue; } 173 for (int j = 0; j < fpa->chips->n; j++) { 174 pmChip *chip = fpa->chips->data[j]; 171 175 172 176 // we have src bounds 173 float Pmin = tgt->Pmin->data.F32[ Nout];174 float Pmax = tgt->Pmax->data.F32[ Nout];175 float Qmin = tgt->Qmin->data.F32[ Nout];176 float Qmax = tgt->Qmax->data.F32[ Nout];177 float Pmin = tgt->Pmin->data.F32[j]; 178 float Pmax = tgt->Pmax->data.F32[j]; 179 float Qmin = tgt->Qmin->data.F32[j]; 180 float Qmax = tgt->Qmax->data.F32[j]; 177 181 178 182 bool valid = false; … … 183 187 valid = Pvalid && Qvalid; 184 188 } 189 // if (valid) { 190 // fprintf (stderr, "chip %d is valid\n", j); 191 // } else { 192 // fprintf (stderr, "chip %d is NOT valid\n", j); 193 // } 185 194 chip->process = valid; 186 195 }
Note:
See TracChangeset
for help on using the changeset viewer.
