next up previous contents
Next: 7. Including and Linking Up: CFHT FITS Handling Library Previous: 5. Getting Keyword Values   Contents

Subsections

6. Setting Keyword Values

6.1 fh_remove()

6.2 fh_this_unit_only()

Once you've called this function on a header unit, subsequent fh_set*() calls will only affect the primary header unit. This has no effect on basic FITS, or if `hu' is already an extension.

6.3 fh_set_com()

`name' should be either "COMMENT" or "HISTORY" and `value' is the rest of the line (will be truncated at 72 characters.)

6.4 fh_set_bool()

Set a logical or boolean FITS keyword. A non-zero `value' is saved as T(rue) and zero is saved as F(alse). Pass a NULL for `comment' to leave the old comment field (or no comment.)

6.5 fh_set_int()

Set an integer FITS keyword. Pass a NULL for `comment' to leave the old comment field (or no comment.)

6.6 fh_set_flt()

Use this to set float (real) values. The value must be of type `double' and will be inserted in the FITS card as a number with a decimal point, and possibly an exponent (as determined by the %G format instruction to printf). `prec' is a precision value, which should reflect the number of significant figures in `value'.

When printing a year, with a century, prec should be at least 4 to ensure that the value does not get printed with an exponent by %G.

Pass a NULL for `comment' to leave the old comment field (or no comment.)

6.7 fh_set_str()

Set a string FITS keyword. If string is longer than 18 characters, the start of the comment field will be shifted, and a comment may get truncated.

Pass a NULL for `comment' to leave the old comment field (or no comment.)

6.8 fh_set_val()

Similar to fh_set_str(), but assumes that you have already sprintf'd the value into a buffer. Use this to get precise control over the formatting of the value field.

6.9 fh_merge()

Merge source_hu into target_hu and sort according to the `idx' numbers that were in both lists. source_hu is not modified.


next up previous contents
Next: 7. Including and Linking Up: CFHT FITS Handling Library Previous: 5. Getting Keyword Values   Contents
Sidik Isani
2001-04-25