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

Arguments

       in.fits

              Original FITS image.

       out.fits

              Padded FITS image.

       left right top bottom

              Number of pixels with which to pad the four sides of the image.

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

       Occasionally we want to pad the border of an image so that there is room for annotation, a color bar,  or
       just  for  visual  effect.   mPad  does this and if a color bar is desired it adds one (wherever the user
       specifies, which might be in the pad or might be over the image).

       The pad around the edges is filled with NULLS (which will be rendered the same  as  the  minimum  in  the
       color  table  but mJPEG/mViewer).  However the user can optionally have NULLs translated to another value
       with the "-val" argument.

Examples

       (mHistogram -file SDSS_r.fits -2s max gaussian-log -out SDSS_r.hist)

              mPad -bar -100 -50 50 -50 SDSS_r.hist SDSS_r.fits sdss.fits 50 250 50 50 [struct stat="OK"]

Messages

       ERROR  No debug level given

       ERROR  Debug level string is invalid: 'badstring'

       ERROR  Debug level value cannot be negative

       ERROR  Not enough information given to draw color bar

       ERROR  Bar X min string is invalid: 'badstring'

       ERROR  Bar X max string is invalid: 'badstring'

       ERROR  Bar Y min string is invalid: 'badstring'

       ERROR  Bar Y max string is invalid: 'badstring'

       ERROR  Cannot open histogram file badfile

       ERROR  No value given for NaN conversion

       ERROR  NaN conversion value string is invalid: 'badstring'

       ERROR  FITSlibraryerror

       ERROR  generalerrormessage

Name

       mPad - None

Options

       -nowcs

              If the image has WCS values in the header, these  need  to  be  adjusted  to  compensate  for  the
              padding.   This  flag is used to tell the software that the image does not contain WCS keywords so
              not to try.

       -d level

              Set debugging level (default none)

       -val NaN-value

              Value to which NULL pixels should be converted.

       -bar xminxmax

              ymin ymax

              histfile

              Addingacolorbaraspartoftheimageisalittletrickierthanitmightatfirstseem.Acolorbarisarectangularregionofpixelswhosedatavaluesaresetsothatitgivestheimpressionofthelookup-tableusedtorendertheimage.Todothis,weneedtheimagehistogramthatmViewer(orwhateverrenderer)wouldusewhendisplayingthedata.Theeasiestwaytodothisisto1)usemHistogramtogeneratethestretchl2)usemPadtoaddthepixelarray(usuallyinapadaddedaroundtheoutsideoftheimage(;and3)usemViewerwiththesamepre-buildhistogramtorendertheimage.

Result

       If successful, the result is a new image almost identical to the original but padded around the edges and
       possibly containing an embedded color bar.  When sent to mViewer, that tool can optionally add annotation
       to the bar.

Synopsis

       mPad  [-nowcs][-d  level][-val  NaN-value][-bar xminxmaxyminymaxhistfile] in.fits out.fits left right
       top bottom

See Also