00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 static const char docstring[] =
00011 "loadfitsa: load array from file in FITS format\n"
00012 "\n"
00013 " [image, error, params] = loadfitsa(file, block, type)\n"
00014 " * File is the name of the fits file to be read, which is an\n"
00015 " arbitrary-dimensional fits file. It is loaded into Matlab in\n"
00016 " the \"natural\" ordering -- the native fits ordering, Fortran\n"
00017 " progession of coordinates. The standard fitsio naming shortcuts\n"
00018 " are accepted, including 'file.fits[1]' for the first image\n"
00019 " extension, useful for loading compressed images in bintables.\n"
00020 " * If the primary HDU (indexed 0 in the shortcut above) is empty,\n"
00021 " i.e. has NAXIS = 0, then we try each following HDU until one is\n"
00022 " non-empty to look for valid data.\n"
00023 " * Block is the blocking factor; only elements 1, block+1, ...\n"
00024 " are loaded (in every dimension).\n"
00025 " * type is the destination Matlab type, e.g. 'double' or 'int32'.\n"
00026 " When using the integer types, be aware that the input FITS file\n"
00027 " must fit within the range of the given type, or there will be\n"
00028 " an error.\n"
00029 " * The resulting array is returned; this is 0x0 if an error occurs.\n"
00030 " * Error is 1 if there was an error, 0 otherwise. An error\n"
00031 " synopsis is printed if error = 1.\n"
00032 " * To allow robust scripting, if error is requested, a matlab\n"
00033 " error is not raised even if a file-related error occurs. The\n"
00034 " error flag is set, and a message is printed, but mexErrMsgTxt is\n"
00035 " not called. (Exception: if the arguments are malformed, as\n"
00036 " opposed to a file-reading problem, a mex error *is* raised.)\n"
00037 " * params, encodes the following parameters: bitpix, bscale, bzero, blank.\n"
00038 " It can be useful to have access to the way the FITS file was encoded.\n"
00039 " * loadfitsa and savefitsa are inverse functions.\n"
00040 "\n"
00041 " Inputs:\n"
00042 " string filename\n"
00043 " opt int block = 1\n"
00044 " opt string type = 'double'\n"
00045 "\n"
00046 " Outputs:\n"
00047 " real image(...)\n"
00048 " int error\n"
00049 " real params(4)\n"
00050 "\n"
00051 " See Also: savefitsa\n"
00052 "\n"
00053 " implemented as a MEX file.\n"
00054 " rewritten by turmon aug 2002\n"
00055 " touched up for 64-bit, better error reporting, arb. class out, 4/2010.\n"
00056 "\n"
00057 "";
00058
00059
00060