IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 3, 2006, 12:01:09 PM (20 years ago)
Author:
eugene
Message:

converted fits_ to gfits_

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/libfits/doc/sample2.c

    r7039 r7054  
    1919
    2020  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");
    2525 
    2626  /* 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);
    3232
    3333  for (i = 0; i < Nrow; i++) {
     
    3838
    3939  /* 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);
    4545
    4646  for (i = 0; i < Nrow; i++) {
     
    5454
    5555/*
    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);
    6060*/
Note: See TracChangeset for help on using the changeset viewer.