Changeset 29327
- Timestamp:
- Oct 5, 2010, 3:27:12 PM (16 years ago)
- Location:
- trunk/ippToPsps/src
- Files:
-
- 2 edited
-
ippToPspsConfig.c (modified) (3 diffs)
-
ippToPspsConfig.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippToPsps/src/ippToPspsConfig.c
r28559 r29327 701 701 } 702 702 703 // gets metadata about a column 704 bool ippToPspsConfig_getFitsColumnMeta( 705 char* name, 706 int* colNum, 707 int* type, 708 long* repeat, 709 fitsfile *fitsIn ) { 710 711 int status = 0; 712 fits_get_colnum(fitsIn, CASESEN, name, colNum, &status); 713 if (status) { 714 psError(PS_ERR_IO, false, "Unable to read col '%s'", name); 715 return false; 716 } 717 718 status = 0; 719 fits_get_eqcoltype(fitsIn, *colNum, type, repeat, NULL, &status); 720 if (status) { 721 psError(PS_ERR_IO, false, "Unable to read type info for '%s'", name); 722 return false; 723 } 724 725 return true; 726 } 727 703 728 // populate with data from another FITS table into this one 704 729 static bool ippToPspsConfig_populateTableFromFits( … … 730 755 int readStatus = 0; 731 756 int writeStatus = 0; 732 757 733 758 // first loop round all columns and get IPP col numbers for provided column names TODO only do once, first time in 734 759 if(!fromHeader) { … … 737 762 738 763 if (strlen(table->columns[i].ippName) < 1) continue; 739 readStatus = 0; 740 fits_get_colnum(fitsIn, CASESEN, table->columns[i].ippName, &table->columns[i].ippColNum, &readStatus); 741 if (readStatus) psError(PS_ERR_IO, false, "%d Unable to read col num for '%s' '%s' %d", i, table->columns[i].pspsName, table->columns[i].ippName, table->columns[i].ippColNum); 764 765 if (!ippToPspsConfig_getFitsColumnMeta( 766 table->columns[i].ippName, 767 &table->columns[i].ippColNum, 768 &table->columns[i].ippType, 769 &table->columns[i].ippRepeat, 770 fitsIn)) {return false;} 742 771 } 743 772 } -
trunk/ippToPsps/src/ippToPspsConfig.h
r28249 r29327 20 20 char ippName[100]; 21 21 int ippType; 22 long ippRepeat; 22 23 char pspsName[100]; // TODO change to 'name' 23 24 int pspsType;
Note:
See TracChangeset
for help on using the changeset viewer.
