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

mSubimage - Create a "cutout" of a FITS image

Arguments

       in.fits
              Input FITS file.

       out.fits
              Path to output FITS file.

       ra     In normal mode, RA of center of output image.

       dec    In normal mode, declination of center of output image.

       xstartpix
              In pixel mode, pixel along the x-axis where the cutout image will begin

       ystartpix
              In pixel mode, pixel along the y-axis where the cutout image will begin

       xsize  In normal mode, width of output image in degrees.

       ysize  In normal mode, height of output image in degrees (default is equal to xsize.

       xpixsize
              In pixel mode, width of output image in pixels

       ypixsize
              In pixel mode, height of output image in pixels (default is equal to xpixsize

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.

Description

       Creates  a  subimage  (or  "cutout")  of  a  FITS  file.   Note that in "normal" mode, all the parameters
       (location and size) are in degrees; in pixel (-p) mode, all of them are in pixels

Examples

       $ mSubimage image1.fits subimage.fits 307.9 37.29 .01 .01
              [struct stat="OK", content="normal"]

Messages

       OK     [struct stat="OK", content="blank,flatornormal"]

       ERROR  HDU value (hdu) must be a non-negative integer

       ERROR  Cannot open status file: statusfile

       ERROR  Center RA string (string) cannot be interpreted as a real number

       ERROR  Center Dec string (string) cannot be interpreted as a real number

       ERROR  X size string (string) cannot be interpreted as a real number

       ERROR  Y size string (string) cannot be interpreted as a real number

       ERROR  Invalid 'x' size

       ERROR  Invalid 'y' size

       ERROR  Image file filename missing or invalid FITS

       ERROR  Cannot find HDU hdu

       ERROR  Output wcsinit() failed.

       ERROR  Location is off image

       ERROR  Region outside image

       ERROR  No pixels match area.

       ERROR  Can't create output file: out.fits

       ERROR  FITSlibraryerror

Name

       mSubimage - Create a "cutout" of a FITS image

Options

       -d     Turns on debugging.

       -a     All pixels - Force retrieval of whole image (useful to extract an entire HDU)

       -h hdu Operate on the specified FITS header extension (HDU)

       -s statusfile
              Output and errors are sent to statusfile instead of to stdout

       -p     Pixel mode - create subimage using pixel locations, instead of a location on the sky

Result

[structstat="OK",content="blank,flatornormal"]

       The content keyword indicates whether all pixels where NaN  (blank),  all  pixels  were  the  same  value
       (flat), or the image appears to be normal.

Synopsis

       mSubimage [-d] [-a] [-h hdu] [-s statusfile] in.fits out.fits ra dec xsize [ysize]

       mSubimage -p [-d] [-h hdu] [-s statusfile] in.fits out.fits xstartpix ystartpix xpixsize [ypixsize]

See Also