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

mMakeImg - Generate synthetic FITS images

Arguments

       template.hdr
              FITS header template, used to indicate the desired parameters of the output image

       out.fits
              Path of FITS image to be generated.

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

       Generates synthetic FITS images, with varying levels of noise, from a table of  provided  point  sources.
       Each  source  is  treated  independently  and  its  flux is distributed on a source-specific point-spread
       function.

Examples

       $ mMakeImg -n 0.01 -b 0 1.0 1.0 0 -t sources.tbl J_MAG 5.0 2000 10.0 template.hdr out.fits
              [struct stat="OK"]

Messages

       OK     [struct stat="OK"]

       ERROR  Can't open table table tbl

       ERROR  Can't find lon, lat columns

       ERROR  Can't find flux/magnitude column 'col'

       ERROR  Template file [template.hdr] not found

       ERROR  Output wcsinit() failed.  Exiting.

       ERROR  FITSlibraryerror

Name

       mMakeImg - Generate synthetic FITS images

Options

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

       -n noise_level
              Specified random noise equal to noise_level will be added to image background.

       -b bg1bg2bg3bg4
              Specifies the four corners for a 'tilted' background for the image. Each value is a floating point
              number specifying the background height at the corner.

       -f     Use uniform flat disk for sources rather than gaussians.

       -r     Replace pixel values rather than adding to them.

       -t tblcolwidthepochmag
              Specifies a table of sources to be added to the raw image. tbl is the table filename, col  is  the
              column  name  which  contains  the source fluxes, width is a floating point number determining the
              point spread of each source, epoch is the  coordinate  system  reference  year,  and  mag  is  the
              reference  magnitude  of  the  source  list.  In addition, the source table should have ra and dec
              columns for the image positions.

              Several input tables can be specified  if  desired  through  repeated  use  of  the  -t  flag  and
              arguments.

Result

       Synthetic FITS output image; sources in image will represent the values from the input table(s).

Synopsis

       mMakeImg  [-d  level]  [-n  noise_level]  [-b  bg1bg2bg3bg4] [-t tblcolwidthepochmag] template.hdr
       out.fits

See Also