Changeset 7054 for trunk/Ohana/src/libfits/doc/sample2.c
- Timestamp:
- May 3, 2006, 12:01:09 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/Ohana/src/libfits/doc/sample2.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/libfits/doc/sample2.c
r7039 r7054 19 19 20 20 strcpy (filename, "test.fits"); 21 fits_read_header (filename, &header);22 fits_read_matrix (filename, &matrix);23 fits_read_ftable (filename, &table1, "ZERO_POINTS");24 fits_read_ftable (filename, &table2, "ASCII_PTS");21 gfits_read_header (filename, &header); 22 gfits_read_matrix (filename, &matrix); 23 gfits_read_ftable (filename, &table1, "ZERO_POINTS"); 24 gfits_read_ftable (filename, &table2, "ASCII_PTS"); 25 25 26 26 /* set table column based on array, extend NAXIS2 as needed/appropriate */ 27 fits_get_bintable_column (&theader1, &table1, "ZP_OBS", &zpobs);28 fits_get_bintable_column (&theader1, &table1, "ZP_REF", &zpref);29 fits_get_bintable_column (&theader1, &table1, "TIME", &time);30 fits_get_bintable_column (&theader1, &table1, "TCHAR", &tchar);31 fits_scan (&theader1, "NAXIS2", "%d", 1, &Nrow);27 gfits_get_bintable_column (&theader1, &table1, "ZP_OBS", &zpobs); 28 gfits_get_bintable_column (&theader1, &table1, "ZP_REF", &zpref); 29 gfits_get_bintable_column (&theader1, &table1, "TIME", &time); 30 gfits_get_bintable_column (&theader1, &table1, "TCHAR", &tchar); 31 gfits_scan (&theader1, "NAXIS2", "%d", 1, &Nrow); 32 32 33 33 for (i = 0; i < Nrow; i++) { … … 38 38 39 39 /* set table column based on array, extend NAXIS2 as needed/appropriate */ 40 fits_get_table_column (&theader2, &table2, "ZP_OBS", &zpobs);41 fits_get_table_column (&theader2, &table2, "ZP_REF", &zpref);42 fits_get_table_column (&theader2, &table2, "TIME", &time);43 fits_get_table_column (&theader2, &table2, "TCHAR", &tchar);44 fits_scan (&theader2, "NAXIS2", "%d", 1, &Nrow);40 gfits_get_table_column (&theader2, &table2, "ZP_OBS", &zpobs); 41 gfits_get_table_column (&theader2, &table2, "ZP_REF", &zpref); 42 gfits_get_table_column (&theader2, &table2, "TIME", &time); 43 gfits_get_table_column (&theader2, &table2, "TCHAR", &tchar); 44 gfits_scan (&theader2, "NAXIS2", "%d", 1, &Nrow); 45 45 46 46 for (i = 0; i < Nrow; i++) { … … 54 54 55 55 /* 56 fits_set_table_column (&theader2, &table2, "ZP_OBS", zpobs, Nrow);57 fits_set_table_column (&theader2, &table2, "ZP_REF", zpref, Nrow);58 fits_set_table_column (&theader2, &table2, "TIME", time, Nrow);59 fits_set_table_column (&theader2, &table2, "TCHAR", tchar, Nrow);56 gfits_set_table_column (&theader2, &table2, "ZP_OBS", zpobs, Nrow); 57 gfits_set_table_column (&theader2, &table2, "ZP_REF", zpref, Nrow); 58 gfits_set_table_column (&theader2, &table2, "TIME", time, Nrow); 59 gfits_set_table_column (&theader2, &table2, "TCHAR", tchar, Nrow); 60 60 */
Note:
See TracChangeset
for help on using the changeset viewer.
