SECCHI_PREP Users Guide 

Using SECCHI_PREP with COR1 and COR2 data

$Id: cor_prep.html,v 1.11 2010/01/26 22:53:37 nathan Exp $

Default Procedures

Calibration

By default, SECCHI_PREP applies the following calibration to COR images:

  1. divide by exposure duration,
  2. correcting for onboard image processing,
  3. subtracting the CCD bias,
  4. multiplying by the calibration factor (converts the image values from digital number (DN) to the physical units of mean solar brightness (MSB)),
  5. vignetting and flat-field correction, and
  6. optical distortion correction (COR2 only).

The calibration values may change during the mission. Any of these operations can turned off using the keywords in COR_CALIBRATE:

IDL> result = COR_CALIBRATE(image, hdr [,/CALFAC_OFF,/BIAS_OFF,/EXPTIME_OFF,/VIGNET_OFF,/SEBIP_OFF, /WARP_OFF])

  • SEB IP - The SEB IP (onboard image processing) can take the square root of the image or divide the image by a factor of 2, 3, or 4 multiple times. The numerical codes for the SEB IP functions are in the FITS Level-0.5 header (IP_00_19). A map of the IP functions by number may be found here. A more detailed description is in Science Operations Manual (MSWord).

  • Bias - The mean (BIASMEAN) and standard deviation (BIASSDEV) of the CCD bias will be in the FITS Level-0.5 header. The function GET_BIASMEAN returns the mean bias from a header. The program accounts for SEB IP bias subtraction and SEB IP image summing.

  • Exposure Time - The exposure time (EXPTIME) is in the level 0.5 header. The function GET_EXPTIME returns the correct exposure time for each image from a header.

  • Calibration Factor - The calibration factor for each instrument is returned by the function GET_CALFAC. The calibration factor can be a time-dependent factor.

  • Calibration Image - The calibration image is a fits file located in $SSW/secchi/calibration or $SECCHI_CAL. The calibration image corrects for photometric variations in the image due to instrumental effects such as vignetting, flat fielding and dark images. The function also crops, scales and rectifies the calibration image array to match the image. The calibration image array is returned by the function GET_CALIMG that gets the version of the function appropriate for that date. The keyword  NEW_CALIMG will force the program to open the calibration image from the disk. 

  • Warp - For COR2 there is an optical distortion which is corrected by COR2_WARP.PRO. This distortion was computed from stars and is illustrated here. COR1 does not have a measured optical distortion function.

  • Missing Block Mask - Missing blocks in the image are set to zero. The program SCC_GET_MISSING returns the index of all the missing pixels in the image. After the calibration is applied these pixels are set to zero. The keywords  FILL_MEAN and FILL_VALUE = value can be used to set the missing pixels to either the mean value of the image or to a user specified value including NaN. 

  • Image Trim - Some SECCHI image include an over and under scan region in the image. These regions are used to calculate the image bias and other calibrations. The over/under scan regions do not contain solar data. The default procedure for SECCHI_PREP is to trim off the over/under scan regions (if any) of the array. The images will not be trimmed if the keyword TRIM_OFF is set in SECCHI_PREP. If the keyword TRIM_OFF is set then the keyword CALIBRATION_OFF is also set. Also the default output size of the images array becomes 2174. 


Optional Procedures

Polarization

The polarization function is part of SECCHI_PREP but can be used alone on calibrated polarized images from  SECCHI_PREP.  The COR_POLARIZ returns the total brightness images calculated from three polarized images taken in a sequence. The input is a cube of three calibrated images and an array of there headers (from SCCREADFITS). The keywords allow the user to return the polarized brightness (pB) or the polarization angle (mu). 

IDL> result = COR_POLARIZ(images, hdrs [,/pB] [,/MU] [,/percent])

Smooth Mask : Occulter and Edge


A smooth mask can be applied to the image with the keyword /SMASK_ON . The smooth mask works for all compression schemes. However, the mask will eliminate some of the data on the edge of the image and around the occulter.   

Rotate Solar North Up

The level 0.5 images are aligned to ecliptic north. If the keyword /ROTATE_ON is set, then the images are rotated to solar north. The difference between solar north and ecliptic north changes though out the year. The header keyword CROTA is the rotation angle of the image about the axis perpendicular to the plane of the image. The image pixel values are interpolated when the image is rotated. 

Color:

Loads IDL color table for each the instrument from the $SSW/stereo/secchi/data/color directory.  The color files are IDL save files that load the variables r, g, b.

Stamp : Date and Logo

To add the date and time of the image in the bottom left corner of the image set the keyword /DATE_ON. The font size of the date and time will scaled to match the size of the image. To add the SECCHI logo to the bottom right corner of the image set the keyword to /LOGO_ON. These keywords should be used when creating images for display. 

Overview

SECCHI_PREP, filenames, headers, images [,SAVEPATH=path] [,OUTSIZE=value] [,/WRITE_FTS] [,/WRITE_PNG] [,/WRITE_JPG] [,/TRIM_OFF] [,/ROTATE_ON] [,/ROTINTERP_ON] [,/ROTCUBIC_ON] [,/CALIBRATE_OFF] [,/CALFAC_OFF] [,/BIAS_OFF] [,/EXPTIME_OFF] [,/CALIMG_OFF] [,/SEBIP_OFF] [,/NEW_CALIMG] [,CALIMG_FILENAME=filename] [/SMASK_ON] [,/FILL_MEAN] [,/FILL_VALUE=value] [/POLARIZ_ON] [,/pB] [,/PERCENT] [,/MU] [,/COLOR_ON] [,/DATE_ON] [/LOGO_ON] [/UPDATE_HDR_OFF] [,/SILENT] [,/NOCALFAC_BUTCORRFORIPSUM]

image = SCC_IMG_TRIM(image, hdr)

Any keywords for sub-procedures may be passed via SECCHI_PREP:

COR_PREP, header, image [,/FILL_MEAN] [,/FILL_VALUE=value] [,/SMASK_ON] [,/ROTATE_ON] [,/ROTINTERP_ON] [,/ROTCUBIC_ON] [,/CALIBRATE_OFF] [,/CALIBRATE_OFF][,/CALFAC_OFF] [,/BIAS_OFF] [,/EXPTIME_OFF] [,/CALIMG_OFF] [,/SEBIP_OFF] [,/NEW_CALIMG] [,CALIMG_FILENAME=filename] [,/COLOR_ON] [,/DATE_ON] [/LOGO_ON] [/UPDATE_HDR_OFF] [,/SILENT]

result = SCC_GET_MISSING(hdr)

result = COR_CALIBRATE(image, hdr [,/CALFAC_OFF] [,/BIAS_OFF] [,/EXPTIME_OFF] [,/CALIMG_OFF] [,/SEBIP_OFF] [,/NEW_CALIMG] [,CALIMG_FILENAME=filename]

image = SEB_IP(image,hdr, ip_flag)

result = GET_BIASMEAN(hdr)

result = GET_EXPTIME(hdr)

result = GET_CALFAC(hdr)

result = GET_CALIMG(hdr [,CALIMG_FILENAME=filename][,/NEW_CALIMG]

hdr = SCC_UPDATE_HDR(im, hdr,[,FILENAME=newfileaname] [/UPDATE_HDR_OFF] [,MISSING =value])

SCC_IMG_STATS image, mn, mx, zeros, nsat, mxval, mnval, nsatmin, men, sig, percentile, medyen, bscale

im = SCC_ADD_DATETIME(im,hdr)

im = SCC_ADD_LOGO(im,hdr)

result = COR_POLARIZ(images, hdrs [,/pB] [,/MU][,/PERCENT])

result = COR_MULLER(hdr)

image = SCC_PUTIN_ARRAY(image, hdr, outsize)

Examples

To create TOTAL BRIGHTNESS images of multiple files :
IDL> SECCHI_PREP, filenames, headers,images, /polariz_on
note: filenames should be a multiple of three and be in chronological order

To create POLARIZED BRIGHTNESS images of multiple files :
IDL> SECCHI_PREP, filenames, headers, images, /polariz_on, /pB

To create POLARIZATION ANGLE images of multiple files :
IDL> SECCHI_PREP, filenames, headers, images, /polariz_on, /mu

To create PERCENT POLARIZED images of multiple files :
IDL> SECCHI_PREP, filenames, headers, images, /polariz_on, /percent