Commit 33ef53177b492dbb44b8c8431a17ec618854756b
1 parent
875d39a1
extension number starts from 0
Showing
1 changed file
with
13 additions
and
13 deletions
test/test_GFits.cpp
| @@ -95,7 +95,7 @@ void test_create(void) | @@ -95,7 +95,7 @@ void test_create(void) | ||
| 95 | try { | 95 | try { |
| 96 | GFits fits; | 96 | GFits fits; |
| 97 | fits.open("test.fits"); | 97 | fits.open("test.fits"); |
| 98 | - GFitsHDU* hdu = fits.hdu(2); | 98 | + GFitsHDU* hdu = fits.hdu(1); |
| 99 | GFitsDblImage* image = (GFitsDblImage*)hdu->data(); | 99 | GFitsDblImage* image = (GFitsDblImage*)hdu->data(); |
| 100 | int nx = image->naxes(0); | 100 | int nx = image->naxes(0); |
| 101 | int ny = image->naxes(1); | 101 | int ny = image->naxes(1); |
| @@ -475,7 +475,7 @@ void test_bintable_double(void) | @@ -475,7 +475,7 @@ void test_bintable_double(void) | ||
| 475 | 475 | ||
| 476 | // Get column | 476 | // Get column |
| 477 | GFitsTableDblCol* col_dbl = | 477 | GFitsTableDblCol* col_dbl = |
| 478 | - (GFitsTableDblCol*)fits.hdu(2)->column("DOUBLE"); | 478 | + (GFitsTableDblCol*)fits.hdu(1)->column("DOUBLE"); |
| 479 | 479 | ||
| 480 | // Check double precision table (operator access) | 480 | // Check double precision table (operator access) |
| 481 | tot_dbl = 0.0; | 481 | tot_dbl = 0.0; |
| @@ -531,7 +531,7 @@ void test_bintable_double(void) | @@ -531,7 +531,7 @@ void test_bintable_double(void) | ||
| 531 | 531 | ||
| 532 | // Get column | 532 | // Get column |
| 533 | GFitsTableDblCol* col_dbl10 = | 533 | GFitsTableDblCol* col_dbl10 = |
| 534 | - (GFitsTableDblCol*)fits.hdu(2)->column("DOUBLE10"); | 534 | + (GFitsTableDblCol*)fits.hdu(1)->column("DOUBLE10"); |
| 535 | 535 | ||
| 536 | // Check double precision table (operator access) | 536 | // Check double precision table (operator access) |
| 537 | tot_dbl = 0.0; | 537 | tot_dbl = 0.0; |
| @@ -834,7 +834,7 @@ void test_bintable_float(void) | @@ -834,7 +834,7 @@ void test_bintable_float(void) | ||
| 834 | 834 | ||
| 835 | // Get column | 835 | // Get column |
| 836 | GFitsTableFltCol* col_flt = | 836 | GFitsTableFltCol* col_flt = |
| 837 | - (GFitsTableFltCol*)fits.hdu(2)->column("FLOAT"); | 837 | + (GFitsTableFltCol*)fits.hdu(1)->column("FLOAT"); |
| 838 | 838 | ||
| 839 | // Check single precision table (operator access) | 839 | // Check single precision table (operator access) |
| 840 | tot_flt = 0.0; | 840 | tot_flt = 0.0; |
| @@ -890,7 +890,7 @@ void test_bintable_float(void) | @@ -890,7 +890,7 @@ void test_bintable_float(void) | ||
| 890 | 890 | ||
| 891 | // Get column | 891 | // Get column |
| 892 | GFitsTableFltCol* col_flt10 = | 892 | GFitsTableFltCol* col_flt10 = |
| 893 | - (GFitsTableFltCol*)fits.hdu(2)->column("FLOAT10"); | 893 | + (GFitsTableFltCol*)fits.hdu(1)->column("FLOAT10"); |
| 894 | 894 | ||
| 895 | // Check single precision table (operator access) | 895 | // Check single precision table (operator access) |
| 896 | tot_flt = 0.0; | 896 | tot_flt = 0.0; |
| @@ -1196,7 +1196,7 @@ void test_bintable_short(void) | @@ -1196,7 +1196,7 @@ void test_bintable_short(void) | ||
| 1196 | 1196 | ||
| 1197 | // Get column | 1197 | // Get column |
| 1198 | GFitsTableShtCol* col_sht = | 1198 | GFitsTableShtCol* col_sht = |
| 1199 | - (GFitsTableShtCol*)fits.hdu(2)->column("SHORT"); | 1199 | + (GFitsTableShtCol*)fits.hdu(1)->column("SHORT"); |
| 1200 | 1200 | ||
| 1201 | // Check short table (operator access) | 1201 | // Check short table (operator access) |
| 1202 | tot_sht = 0; | 1202 | tot_sht = 0; |
| @@ -1252,7 +1252,7 @@ void test_bintable_short(void) | @@ -1252,7 +1252,7 @@ void test_bintable_short(void) | ||
| 1252 | 1252 | ||
| 1253 | // Get column | 1253 | // Get column |
| 1254 | GFitsTableShtCol* col_sht10 = | 1254 | GFitsTableShtCol* col_sht10 = |
| 1255 | - (GFitsTableShtCol*)fits.hdu(2)->column("SHORT10"); | 1255 | + (GFitsTableShtCol*)fits.hdu(1)->column("SHORT10"); |
| 1256 | 1256 | ||
| 1257 | // Check short table (operator access) | 1257 | // Check short table (operator access) |
| 1258 | tot_sht = 0; | 1258 | tot_sht = 0; |
| @@ -1556,7 +1556,7 @@ void test_bintable_long(void) | @@ -1556,7 +1556,7 @@ void test_bintable_long(void) | ||
| 1556 | 1556 | ||
| 1557 | // Get column | 1557 | // Get column |
| 1558 | GFitsTableLngCol* col_lng = | 1558 | GFitsTableLngCol* col_lng = |
| 1559 | - (GFitsTableLngCol*)fits.hdu(2)->column("LONG"); | 1559 | + (GFitsTableLngCol*)fits.hdu(1)->column("LONG"); |
| 1560 | 1560 | ||
| 1561 | // Check long table (operator access) | 1561 | // Check long table (operator access) |
| 1562 | tot_lng = 0; | 1562 | tot_lng = 0; |
| @@ -1612,7 +1612,7 @@ void test_bintable_long(void) | @@ -1612,7 +1612,7 @@ void test_bintable_long(void) | ||
| 1612 | 1612 | ||
| 1613 | // Get column | 1613 | // Get column |
| 1614 | GFitsTableLngCol* col_lng10 = | 1614 | GFitsTableLngCol* col_lng10 = |
| 1615 | - (GFitsTableLngCol*)fits.hdu(2)->column("LONG10"); | 1615 | + (GFitsTableLngCol*)fits.hdu(1)->column("LONG10"); |
| 1616 | 1616 | ||
| 1617 | // Check long table (operator access) | 1617 | // Check long table (operator access) |
| 1618 | tot_lng = 0; | 1618 | tot_lng = 0; |
| @@ -1914,7 +1914,7 @@ void test_bintable_string(void) | @@ -1914,7 +1914,7 @@ void test_bintable_string(void) | ||
| 1914 | 1914 | ||
| 1915 | // Get column | 1915 | // Get column |
| 1916 | GFitsTableStrCol* col_str = | 1916 | GFitsTableStrCol* col_str = |
| 1917 | - (GFitsTableStrCol*)fits.hdu(2)->column("STRING"); | 1917 | + (GFitsTableStrCol*)fits.hdu(1)->column("STRING"); |
| 1918 | 1918 | ||
| 1919 | // Check string table (operator access) | 1919 | // Check string table (operator access) |
| 1920 | tot_str.clear(); | 1920 | tot_str.clear(); |
| @@ -1970,7 +1970,7 @@ void test_bintable_string(void) | @@ -1970,7 +1970,7 @@ void test_bintable_string(void) | ||
| 1970 | 1970 | ||
| 1971 | // Get column | 1971 | // Get column |
| 1972 | GFitsTableStrCol* col_str10 = | 1972 | GFitsTableStrCol* col_str10 = |
| 1973 | - (GFitsTableStrCol*)fits.hdu(2)->column("STRING10"); | 1973 | + (GFitsTableStrCol*)fits.hdu(1)->column("STRING10"); |
| 1974 | 1974 | ||
| 1975 | // Check string table (operator access) | 1975 | // Check string table (operator access) |
| 1976 | tot_str.clear(); | 1976 | tot_str.clear(); |
| @@ -2276,7 +2276,7 @@ void test_bintable_logical(void) | @@ -2276,7 +2276,7 @@ void test_bintable_logical(void) | ||
| 2276 | 2276 | ||
| 2277 | // Get column | 2277 | // Get column |
| 2278 | GFitsTableLogCol* col = | 2278 | GFitsTableLogCol* col = |
| 2279 | - (GFitsTableLogCol*)fits.hdu(2)->column("LOGICAL"); | 2279 | + (GFitsTableLogCol*)fits.hdu(1)->column("LOGICAL"); |
| 2280 | 2280 | ||
| 2281 | // Check table (operator access) | 2281 | // Check table (operator access) |
| 2282 | tot_int = 0; | 2282 | tot_int = 0; |
| @@ -2332,7 +2332,7 @@ void test_bintable_logical(void) | @@ -2332,7 +2332,7 @@ void test_bintable_logical(void) | ||
| 2332 | 2332 | ||
| 2333 | // Get column | 2333 | // Get column |
| 2334 | GFitsTableLogCol* col10 = | 2334 | GFitsTableLogCol* col10 = |
| 2335 | - (GFitsTableLogCol*)fits.hdu(2)->column("LOGICAL10"); | 2335 | + (GFitsTableLogCol*)fits.hdu(1)->column("LOGICAL10"); |
| 2336 | 2336 | ||
| 2337 | // Check table (operator access) | 2337 | // Check table (operator access) |
| 2338 | tot_int = 0; | 2338 | tot_int = 0; |