ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/JSOC/proj/globalhs/apps/jretile_manytofew.c
(Generate patch)

Comparing proj/globalhs/apps/jretile_manytofew.c (file contents):
Revision 1.8 by tplarson, Thu Sep 18 14:18:29 2014 UTC vs.
Revision 1.9 by tplarson, Fri Mar 31 19:43:36 2017 UTC

# Line 197 | Line 197 | int jretile_manytofew(void)
197    if (outkeytest != NULL && outkeytest->info->recscope == 1)
198      sinbdivsout=drms_getkey_int(tempoutrec, "SINBDIVS", &status);
199  
200 +  float apinnerout=0.0;
201 +  float apwidthout=0.0;
202 +  outkeytest = hcon_lookup_lower(&tempoutrec->keywords, "APINNER");
203 +  if (outkeytest != NULL && outkeytest->info->recscope == 1)
204 +    apinnerout=drms_getkey_float(tempoutrec, "APINNER", &status);
205 +  outkeytest = hcon_lookup_lower(&tempoutrec->keywords, "APWIDTH");
206 +  if (outkeytest != NULL && outkeytest->info->recscope == 1)
207 +    apwidthout=drms_getkey_float(tempoutrec, "APWIDTH", &status);
208 +
209    drms_close_record(tempoutrec, DRMS_FREE_RECORD);
210  
211    char *inchecklist[] = {"T_START", "QUALITY", "LMIN", "LMAX", "T_STEP"};
# Line 262 | Line 271 | int jretile_manytofew(void)
271    }
272  
273    inkeytest = hcon_lookup_lower(&inrec->keywords, "SINBDIVS");
274 <  if (outkeytest != NULL)
274 >  if (inkeytest != NULL)
275      sinbdivs=drms_getkey_int(inrec, "SINBDIVS", &status);
276    if (sinbdivsout != -1 && sinbdivsout != sinbdivs)
277    {
# Line 270 | Line 279 | int jretile_manytofew(void)
279      drms_close_records(inrecset, DRMS_FREE_RECORD);
280      return 1;
281    }
282 +
283 +  float apinner=0.0;
284 +  float apwidth=0.0;
285 +  inkeytest = hcon_lookup_lower(&inrec->keywords, "APINNER");
286 +  if (inkeytest != NULL)
287 +    apinner=drms_getkey_float(inrec, "APINNER", &status);
288 +  if (apinnerout != 0.0 && (int)(10000*apinnerout) != (int)(10000*apinner))
289 +  {
290 +    fprintf(stderr, "ERROR: input APINNER does not equal output APINNER, in=%d, out=%d\n",apinner, apinnerout);
291 +    drms_close_records(inrecset, DRMS_FREE_RECORD);
292 +    return 1;
293 +  }
294 +
295 +  inkeytest = hcon_lookup_lower(&inrec->keywords, "APWIDTH");
296 +  if (inkeytest != NULL)
297 +    apwidth=drms_getkey_float(inrec, "APWIDTH", &status);
298 +  if (apinnerout != 0.0 && (int)(10000*apwidthout) != (int)(10000*apwidth))
299 +  {
300 +    fprintf(stderr, "ERROR: input APWIDTH does not equal output APWIDTH, in=%d, out=%d\n", apwidth, apwidth);
301 +    drms_close_records(inrecset, DRMS_FREE_RECORD);
302 +    return 1;
303 +  }
304  
305    status=drms_stage_records(inrecset, 1, 0);
306    if (status != DRMS_SUCCESS)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines