logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

mMakeHdr - Create a FITS header template for use in mosaic creation

Arguments

       images.tbl
              Metadata table (generated by mImgtbl) describing the images to be mosaicked.

       template.hdr
              Path to header template to be generated.

       system (optional)
              Specifies the system for the header (default is Equatorial).  Possible values are:

              EQUJ EQUB ECLJ ECLB GAL SGAL

       equinox (optional)
              If a coordinate system is specified, the equinox can also be given in the form YYYY.   Default  is
              J2000.

Bugs

       The drizzle algorithm has been implemented but has not been tested in this release.

       If a header template contains carriage returns (i.e., created/modified on a Windows machine), the cfitsio
       library  will  be  unable  to read it properly, resulting in the error: [struct stat="ERROR", status=207,
       msg="illegal character in keyword"]

       It is best for the background correction  algorithms  if  the  area  described  in  the  header  template
       completely encloses all of the input images in their entirety. If parts of input images are "chopped off"
       by  the  header  template,  the  background correction will be affected. We recommend you use an expanded
       header for the reprojection and background modeling steps, returning to  the  originally  desired  header
       size  for  the  final  coaddition.  The  default background matching assumes that there are no non-linear
       background variations in the individual images (and therefore in the overlap differences).  If  there  is
       any  uncertainty  in  this  regard, it is safer to turn on the "level only" background matching (the "-l"
       flag in mBgModel.

       Due to some numerical approximation, the "North Up" bounding box calculated when the -n switch is on  can
       be skewed a fraction of a degree.

Description

       From a list of images to be mosaicked together, mMakeHdr generates the FITS header  that  best  describes
       the  output  image.   If the input metadata represent a properly matched set of data cubes (three or four
       dimensions), the header will reflect this and can be used in cube mosaicking.  If the spatial coverage of
       the data is large enough that a TAN projection header is infeasable, an allsky (AITOFF)  header  will  be
       created,  though  this  should be used with caution as it can easily be the result of metadata for images
       that shouldn't really be combined.

Examples

       $ mMakeHdr 2mass-images.tbl orig.hdr
              [struct stat="OK", count=30]

Messages

       OK     [struct   stat   =   "OK",   count=nimages,   ncube=ncubes,   clon=ra,  clat=dec,  lonsize=crpix1,
              latsize=crpix2,  posang=ang,  lon1=ra1,  lat1=dec1,  lon2=ra2,  lat2=dec2,  lon3=ra3,   lat3=dec3,
              lon4=ra4, lat4=dec4]

       OK     messagesaboutprojectionandnumberofaxes>

       ERROR  Memory allocation failure.

       ERROR  Invalid pixel scale string: cdelt

       ERROR  Cannot open status file: statusfile

       ERROR  Invalid system string.  Must be EQUJ|EQUB|ECLJ|ECLB|GAL|SGAL

       ERROR  Equinox string is not a number

       ERROR  Can't open output header file.

       ERROR  Invalid image metadata file: filename

       ERROR  Need  columns:  ctype1  ctype2  nl  ns  crval1  crval2 crpix1 crpix2 cdelt1 cdelt2 crota2 (equinox
              optional).  Four corners (equatorial) will be used if they exist or even  just  a  single  set  of
              coordinates

       ERROR  Bad WCS for image n

       ERROR  Error computing boundaries.

       ERROR  Output wcsinit() failed.

Name

       mMakeHdr - Create a FITS header template for use in mosaic creation

Options

       -d level
              Turns on debugging to the specified level (1-3).

       -s statusfile
              Output and errors are written to statusfile instead of to stdout.

       -p cdelt
              Specify a pixel scale for the header, if different from the input images.

       -P maxpixel
              Sanity check; forces an upper limit on derived NAXIS1, NAXIS2, just in time.

       -n     "North-aligned" flag.  By default, the FITS header  generated  represents  the  best  fit  to  the
              images,  often  resulting in a slight rotation.  If you want north to be straight up in your final
              mosaic, you should use this flag.

Result

       Creation of output file template.hdr.

Synopsis

       MakeHdr  [-d  level]  [-s  statusfile]  [-p(ixel-scale) cdelt] [-P maxpixel] [-n] images.tbl template.hdr
       [system [equinox]]

See Also