Changeset 38424
- Timestamp:
- Jun 7, 2015, 11:41:31 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ohana.20150429/src/opihi/cmd.data/read_vectors.c
r38406 r38424 524 524 525 525 int Nfields; 526 if (!gfits_scan (&header, "TFIELDS", "%d", 1, &Nfields)) ESCAPE ("cannot find TFIELDS in header ");526 if (!gfits_scan (&header, "TFIELDS", "%d", 1, &Nfields)) ESCAPE ("cannot find TFIELDS in header\n"); 527 527 for (i = 0; i < Nfields; i++) { 528 528 gfits_byteswap_varlength_column (&table, i+1); 529 529 } 530 if (!gfits_uncompress_table (&table, &rawtable)) ESCAPE ("failed to uncompress table ");530 if (!gfits_uncompress_table (&table, &rawtable)) ESCAPE ("failed to uncompress table\n"); 531 531 dump_raw_table (&rawtable, "rd raw"); 532 532 … … 546 546 Nval = 0; 547 547 if (Binary) { 548 if (!gfits_get_bintable_column_type (outheader, argv[i], type, &Nval)) ESCAPE ("requested field not found ");549 if (!gfits_get_bintable_column_raw (outheader, outtable, argv[i], &data, IsCompressed)) ESCAPE ("error reading data from specified field ");548 if (!gfits_get_bintable_column_type (outheader, argv[i], type, &Nval)) ESCAPE ("requested field not found\n"); 549 if (!gfits_get_bintable_column_raw (outheader, outtable, argv[i], &data, IsCompressed)) ESCAPE ("error reading data from specified field\n"); 550 550 } else { 551 if (!gfits_get_table_column_type (outheader, argv[i], type)) ESCAPE ("requested field not found ");552 if (!gfits_get_table_column (outheader, outtable, argv[i], &data)) ESCAPE ("error reading data from specified field ");553 } 554 if (Nval == 0) ESCAPE ("no data for field in table ");551 if (!gfits_get_table_column_type (outheader, argv[i], type)) ESCAPE ("requested field not found\n"); 552 if (!gfits_get_table_column (outheader, outtable, argv[i], &data)) ESCAPE ("error reading data from specified field\n"); 553 } 554 if (Nval == 0) ESCAPE ("no data for field in table\n"); 555 555 556 556 vecType = OPIHI_INT; … … 589 589 else 590 590 sprintf (name, "%s:%d", argv[i], j); 591 if ((vec[j] = SelectVector (name, ANYVECTOR, TRUE)) == NULL) ESCAPE ("bad vector name ");591 if ((vec[j] = SelectVector (name, ANYVECTOR, TRUE)) == NULL) ESCAPE ("bad vector name\n"); 592 592 ResetVector (vec[j], vecType, Ny); 593 593 } 594 594 595 if (!VectorAssignData (vec, type, data, Ny, Nval)) ESCAPE ("bad column type %s ", type);595 if (!VectorAssignData (vec, type, data, Ny, Nval)) ESCAPE ("bad column type %s\n", type); 596 596 597 597 } else { … … 603 603 else 604 604 sprintf (name, "%s:%d", argv[i], j); 605 if ((vec[j] = SelectVector (name, ANYVECTOR, TRUE)) == NULL) ESCAPE ("bad vector name ");605 if ((vec[j] = SelectVector (name, ANYVECTOR, TRUE)) == NULL) ESCAPE ("bad vector name\n"); 606 606 ResetVector (vec[j], vecType, Nval); 607 607 } 608 608 609 if (!VectorAssignDataTranspose (vec, type, data, Ny, Nval)) ESCAPE ("bad column type %s ", type);609 if (!VectorAssignDataTranspose (vec, type, data, Ny, Nval)) ESCAPE ("bad column type %s\n", type); 610 610 } 611 611 free (data);
Note:
See TracChangeset
for help on using the changeset viewer.
