FOREIGN(3)

PACKAGE
foreign - Routines to convert between Karma and other data formats

PURPOSE
These routines convert between the Karma data format and foreign data formats.

LIBRARY
karma

LINK WITH
-lkarma

FUNCTIONS

foreign_aips1_read_dataset_names
    Get the names of AIPS1 datasets in the directory catalogue.

foreign_aips1_read
    Read an AIPS dataset.

foreign_aips1_read_header
    Read an AIPS dataset header.

foreign_aips1_read_data
    Read data in an AIPS file.

foreign_aips1_read_history
    Read history for an AIPS file.

foreign_aips1_close_data_context
    Close a KAIPS1DataContext object.

foreign_aips2_test
    Test if a directory is an AIPS++ Image file.

foreign_aips2_run
    Fork and execute a programme.

foreign_drao_read_dataset_names
    Get the names of DRAO datasets in the directory catalogue.

foreign_drao_read
    Read a DRAO dataset.

foreign_drao_read_header
    Read a DRAO dataset header.

foreign_drao_read_data
    Read data in a DRAO file.

foreign_drao_rewind_data_context
    Rewind a KDRAODataContext object.

foreign_drao_close_data_context
    Close a KDRAODataContext object.

foreign_filter_get_format
    Get the filter format

foreign_filter_test_directory_dataset
    Test if a directory is a dataset.

foreign_filter_get_channel
    Get the channel for a filtered file.

foreign_filter_read
    Read a filtered file.

foreign_filter_register
    Register a filter.

foreign_fits_read_header
    Read a FITS header.

foreign_fits_read
    Read a FITS file.

foreign_fits_read_data
    Read data in a FITS file.

foreign_fits_write
    Write a FITS file to a channel.

foreign_fits_write_iarray
    Write a FITS file to a channel.

foreign_fits_write_header
    Write a FITS header to a channel object.

foreign_fits_write_data
    Write data to a FITS file.

foreign_fits_write_padding
    Write trailing pad bytes up to the card end.

foreign_gildas_read
    Read a GILDAS dataset.

foreign_gildas_read_header
    Read a GILDAS dataset header.

foreign_gildas_read_data
    Read data in a GILDAS file.

foreign_gildas_close_data_context
    Close a KGILDASDataContext object.

foreign_gipsy_test
    Test if a file is part of a GIPSY file set.

foreign_gipsy_read_header
    Read a GIPSY file header.

foreign_gipsy_read_data
    Read data in a GIPSY image file.

foreign_gipsy_read
    Read a GIPSY file set.

foreign_gipsy_write
    Write a GIPSY file.

foreign_gipsy_write_iarray
    Write a GIPSY file.

foreign_gipsy_write_header
    Write a GIPSY header.

foreign_guess_and_read
    Guess file type and read.

foreign_read_and_setup
    Read a file and perform some setup.

foreign_guess_write
    Write a data structure, guessing the output format.

foreign_idf_test
    Test if a file is part of an IDF file set.

foreign_idf_read_header
    Read an IDF file header.

foreign_idf_read_data
    Read data in an IDF image file.

foreign_idf_read
    Read an IDF file set.

foreign_iraf_read
    Read an IRAF dataset.

foreign_iraf_read_header
    Read an IRAF dataset header.

foreign_iraf_read_data
    Read data in an IRAF file.

foreign_iraf_close_data_context
    Close a KIRAFDataContext object.

foreign_miriad_test2
    Test if a directory is a Miriad Image file.

foreign_miriad_read_header2
    Read a Miriad Image or Visibility file header.

foreign_miriad_read
    Read a Miriad image file.

foreign_miriad_create_data_context
    Create a context suitable for reading Miriad Image data.

foreign_miriad_read_data
    Read data in a Miriad Image file.

foreign_miriad_close_data_context
    Close a KMiriadDataContext object.

foreign_miriad_read_history
    Read the history component of a Miriad Image file.

foreign_miriad_read_get_alignment_padding
    Compute padding to align to a word boundary.

foreign_miriad_write
    Write a Miriad Image file.

foreign_miriad_write_iarray
    Write a Miriad Image file.

foreign_miriad_write_header_entry
    Write a Miriad header entry.

foreign_guess_format_from_filename
    Attempt to guess the format of a file by examining its filename.

foreign_pgm_read
    Read a colour image in PGM format from a channel.

foreign_pnm_read_type
    Read the type of a PNM file.

foreign_pnm_read
    Read a PNM file.

foreign_pnm_read2
    Read a PNM file.

foreign_ppm_read
    Read a colour image in PPM format from a channel.

foreign_ppm_write
    Write a colour image to a channel in PPM format.

foreign_ppm_write_pseudo
    Write a PseudoColor image to a channel in PPM format.

foreign_ppm_write_rgb
    Write a TrueColor image to a channel in PPM format.

foreign_sunras_read
    Read an image in Sun rasterfile format from a channel.

foreign_sunras_write
    Write a colour image to a channel in Sun rasterfile format.

foreign_sunras_write_pseudo
    Write a PseudoColor image to a channel in Sun rasterfile format.

foreign_sunras_write_rgb
    Write a TrueColor image to a channel in Sun rasterfile format.

TABLE foreign_ATT_FITS_READ_HEADER
List of attributes for reading FITS headers
Name Type Meaning
FA_FITS_READ_HEADER_END End of varargs list
FA_FITS_READ_HEADER_ALLOC_TRUNC flag Allow truncated headers

TABLE foreign_ATT_FITS_READ_DATA
List of attributes for reading FITS data
Name Type Meaning
FA_FITS_READ_DATA_END End of varargs list
FA_FITS_READ_DATA_NUM_BLANKS unsigned long * Number of blank values found
FA_FITS_READ_DATA_SKIP_BLOCKSflag Skip blocks

TABLE foreign_ATT_FITS_READ
List of attributes for reading FITS files (header+data)
Name Type Meaning
FA_FITS_READ_END End of varargs list
FA_FITS_READ_NUM_BLANKS unsigned long * Number of blank values found
FA_FITS_READ_MMAP_OPTION unsigned int See <-ch_MAP_CONTROLS->
FA_FITS_READ_WRITABLE flag If TRUE array may be written to
FA_FITS_READ_SIMPLE flag If TRUE read a ".sfits" file

TABLE foreign_ATT_FITS_WRITE
List of attributes for writing FITS files (header+data)
Name Type Meaning
FA_FITS_WRITE_END End of varargs list

TABLE foreign_ATT_FITS_WRITE_DATA
List of attributes for writing FITS data
Name Type Meaning
FA_FITS_WRITE_DATA_END End of varargs list

TABLE foreign_ATT_GUESS_READ
List of attributes for guessing and reading data
Name Type Meaning
FA_GUESS_READ_END End of varargs list
FA_GUESS_READ_FITS_TO_FLOAT flag Convert FITS data to floating point

TABLE foreign_ATT_GUESS_WRITE
List of attributes for guessing and writing data
Name Type Meaning
FA_GUESS_WRITE_END End of varargs list

TABLE foreign_ATT_MIRIAD_READ_HEADER
List of attributes for reading Miriad Image headers
Name Type Meaning
FA_MIRIAD_READ_HEADER_END End of varargs list

TABLE foreign_ATT_MIRIAD_READ_DATA
List of attributes for reading Miriad Image data
Name Type Meaning
FA_MIRIAD_READ_DATA_END End of varargs list
FA_MIRIAD_READ_DATA_NUM_BLANKS unsigned long * Number of blank values
(includes masked values)
FA_MIRIAD_READ_DATA_NUM_MASKED unsigned long * Number of masked values
FA_MIRIAD_READ_DATA_SKIP_BLOCKSflag Skip blocks

TABLE foreign_ATT_MIRIAD_READ
List of attributes for reading Miriad Image files
Name Type Meaning
FA_MIRIAD_READ_END End of varargs list
FA_MIRIAD_READ_NUM_BLANKS unsigned long * Number of blank values
(includes masked values)
FA_MIRIAD_READ_NUM_MASKED unsigned long * Number of masked values

TABLE foreign_ATT_MIRIAD_WRITE
List of attributes for writing Miriad Image files
Name Type Meaning
FA_MIRIAD_WRITE_END End of varargs list
FA_MIRIAD_WRITE_EXTRA_HISTORY flag Generate extra history

TABLE foreign_ATT_GIPSY_READ_HEADER
List of attributes for reading GIPSY Image headers
Name Type Meaning
FA_GIPSY_READ_HEADER_END End of varargs list

TABLE foreign_ATT_GIPSY_READ_DATA
List of attributes for reading GIPSY Image data
Name Type Meaning
FA_GIPSY_READ_DATA_END End of varargs list
FA_GIPSY_READ_DATA_NUM_BLANKS unsigned long * Number of blank values
FA_GIPSY_READ_DATA_SKIP_BLOCKSflag Skip blocks

TABLE foreign_ATT_GIPSY_READ
List of attributes for reading GIPSY Image files
Name Type Meaning
FA_GIPSY_READ_END End of varargs list
FA_GIPSY_READ_NUM_BLANKS unsigned long * Number of blank values

TABLE foreign_ATT_GIPSY_WRITE
List of attributes for writing GIPSY Image files
Name Type Meaning
FA_GIPSY_WRITE_END End of varargs list

TABLE foreign_ATT_GIPSY_WRITE_HEADER
List of attributes for writing GIPSY Image file headers
Name Type Meaning
FA_GIPSY_WRITE_HEADER_END End of varargs list

TABLE foreign_TYPES
List of foreign file types
Name Meaning
FOREIGN_FILE_FORMAT_KARMA Karma file (native format)
FOREIGN_FILE_FORMAT_UNKNOWN Unknown format
FOREIGN_FILE_FORMAT_PPM Portable PixMap format (PPM)
FOREIGN_FILE_FORMAT_FITS Flexible Image Transport System (FITS)
FOREIGN_FILE_FORMAT_SUNRAS Sun Rasterfile
FOREIGN_FILE_FORMAT_MIRIAD Miriad Image file
FOREIGN_FILE_FORMAT_GIPSY GIPSY file
FOREIGN_FILE_FORMAT_PGM Portable Grey Map (PGM) file

TABLE foreign_ATT_PPM_WRITE
List of attributes for writing PPM files
Name Type Meaning
FA_PPM_WRITE_END End of varargs list

TABLE foreign_ATT_PPM_READ
List of attributes for reading PPM files
Name Type Meaning
FA_PPM_READ_END End of varargs list
FA_PPM_READ_BINARY flag If provided, do not read first line and use
flag value

TABLE foreign_ATT_PGM_READ
List of attributes for reading PGM files
Name Type Meaning
FA_PGM_READ_END End of varargs list

TABLE foreign_ATT_SUNRAS_READ
List of attributes for reading Sun Rasterfile files
Name Type Meaning
FA_SUNRAS_READ_END End of varargs list

TABLE foreign_ATT_SUNRAS_WRITE
List of attributes for writing Sun Rasterfile files
Name Type Meaning
FA_SUNRAS_WRITE_END End of varargs list
FA_SUNRAS_WRITE_NO_IMAGE flag * No image found in data structure

TABLE foreign_ATT_IDF_READ_HEADER
List of attributes for reading IDF headers
Name Type Meaning
FA_IDF_READ_HEADER_END End of varargs list

TABLE foreign_ATT_IDF_READ_DATA
List of attributes for reading IDF data
Name Type Meaning
FA_IDF_READ_DATA_END End of varargs list
FA_IDF_READ_DATA_NUM_BLANKS unsigned long * Number of blank values found
FA_IDF_READ_DATA_SKIP_BLOCKS flag Skip blocks

TABLE foreign_ATT_IDF_READ
List of attributes for reading IDF files (header+data)
Name Type Meaning
FA_IDF_READ_END End of varargs list
FA_IDF_READ_NUM_BLANKS unsigned long * Number of blank values found

TABLE foreign_ATT_DRAO_READ_HEADER
List of attributes for reading DRAO headers
Name Type Meaning
FA_DRAO_READ_HEADER_END End of varargs list
FA_DRAO_READ_HEADER_PARTIAL flag Enable reading of partial data

TABLE foreign_ATT_DRAO_READ
List of attributes for reading DRAO files (header+data)
Name Type Meaning
FA_DRAO_READ_END End of varargs list
FA_DRAO_READ_PARTIAL flag Enable reading of partial data

AUTHOR
Richard Gooch (rgooch@atnf.csiro.au)

AVAILABLITY
The Karma Distribution is available for anonymous ftp from: ftp://ftp.atnf.csiro.au/pub/software/karma/ ftp://wuarchive.wustl.edu/graphics/graphics/packages/karma/ ftp://ftp.pwr.wroc.pl/pub/karma/ The Karma Home Page is: http://www.atnf.csiro.au/karma/