• atExpDiskAdd
  • atDeVaucAdd
  • atDeVaucAddSlow
  • atExpDiskAddSlow
  • atDeltaAdd
  • atWingAdd
  • atRegStatNoiseAdd
  • atImSim

      Routines to simulate images
    
    
    
    

    atExpDiskAdd

    DESCRIPTION:
    
    This routine adds an exponential disk to the image.
    RETURN VALUES:
    
    SH_SUCCESS
    SIGNATURE:
      
      RET_CODE atExpDiskAdd (
      		       REGION *region, 
      		       double row, 
      		       double col, 
      		       double Izero, 
      		       double rs, 
      		       double theta, 
      		       double axisRatio,
      		       int peak,
      		       int fast,
      		       double *countsAdded
      		       )
    

    atDeVaucAdd

    DESCRIPTION:
    
    This routine adds an de Vaucouleurs profile to the image. Stops when the counts fall to 0.1 per pixel.
    RETURN VALUES:
    
    SH_SUCCESS
    SIGNATURE:
      
      RET_CODE atDeVaucAdd (
      		      REGION *region, 
      		      double row, 
      		      double col, 
      		      double Izero, 
      		      double rs, 
      		      double theta,
      		      double axisRatio,
      		      int peak,
      		      int fast,
      		      double *countsAdded
      		      )
    

    atDeVaucAddSlow

    DESCRIPTION:
    
    This routine adds a de Vaucouleurs profile to the image. Goes out to rmax and only works on FL32 regions.
    RETURN VALUES:
    
    SH_SUCCESS
    SIGNATURE:
      
      RET_CODE atDeVaucAddSlow (
      			  REGION *region, /* region to add profile to */
      			  double row, /* row position */
      			  double col, /* column position */
      			  double counts, /* total counts */
      			  double rs, /* scale length */
      			  double maxRad, /* maximum distance from center */
      			  double theta,	/* position angle */
      			  double axisRatio, /* b/a */
      			  int ngrid, /* size of grid to sample pixels */
      			  double *countsOut /* counts actually added */
      			  )
    

    atExpDiskAddSlow

    DESCRIPTION:
    
    This routine adds an exponential disk profile to the image. Goes out to rmax and only works on FL32 regions.
    RETURN VALUES:
    
    SH_SUCCESS
    SIGNATURE:
      
      RET_CODE atExpDiskAddSlow(
      			  REGION *region, /* region to add profile to */
      			  double row, /* row position */
      			  double col, /* column position */
      			  double counts, /* total counts */
      			  double rs, /* scale length */
      			  double maxRad, /* maximum distance from center */
      			  double theta,	/* position angle */
      			  double axisRatio, /* b/a */
      			  int ngrid, /* size of grid to sample pixels */
      			  double *countsOut /* counts actually added */
      			  )
    

    atDeltaAdd

    DESCRIPTION:
    
    This routine adds a delta function to an image. The image can then be convolved with a gaussian or other PSF to result in a stellar profile. The routine actually distributes light in 3 pixels arranged in a 'L' shape so that sub-pixel centroiding of the final star will result. The weighting of the light is such that the standard moment of the light has the indicated centroid, but more complicated weighting of the light (gaussian weighted) will be biased at the 50 milli-pixel level.
    RETURN VALUES:
    
    SH_SUCCESS
    SIGNATURE:
      
      RET_CODE atDeltaAdd (
      		     REGION *region, 
      		     double row, 
      		     double col, 
      		     double Izero, 
      		     double *countsAdded
      		     )
    

    atWingAdd

    DESCRIPTION:
    
    This routine adds a power law wing to an image. It stops when the counts in the wing decrease to 0.1 DN. The central pixel or so of the wing may be excluded to avoid an infinite density cusp at r=0 (set the minR param). The axial ratio of the wing may be specified for an elliptical wing and the power law and peak of the wing may be specified.
    RETURN VALUES:
    
    SH_SUCCESS
    SIGNATURE:
      
      RET_CODE atWingAdd (
      		    REGION *region, 
      		    double row, 
      		    double col, 
      		    double Izero, 
      		    double alpha, 
      		    double theta,
      		    double axisRatio,
      		    double minR,
      		    int peak,
      		    int fast,
      		    double *countsAdded
      		    )
    

    atRegStatNoiseAdd

      DESCRIPTION:  Add statistical noise to a region, assuming gain=1
    
      RETURN VALUES: SH_SUCCESS
    
    
    SIGNATURE:
      RET_CODE atRegStatNoiseAdd(
                                 REGION *reg
                                 )