SECCHI_PREP Users Guide

Using SECCHI_PREP with EUVI data

$Id: euvi_prep.html,v 1.11 2013/06/07 20:59:05 nathan Exp $

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] [,/NORMAL_OFF] [,/BIAS_OFF] [,/EXPTIME_OFF] [,/CALIMG_OFF] [,/DN2P_OFF] [,/SEBIP_OFF] [,/NEW_CALIMG] [,CALIMG_FILENAME=filename] [,/SMASK_ON][,/FILL_MEAN] [,/FILL_VALUE = value] [,/COLOR_ON] [,/DATE_ON] [,/LOGO_ON] [/UPDATE_HDR_OFF] [,/SILENT] [,/NOCALFAC_BUTCORRFORIPSUM] [,/POINTING_OFF]

image = SCC_IMG_TRIM(image, hdr)

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

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

result = SCC_GET_MISSING(hdr)

result = EUVI_CORRECTION(image, hdr, [,/NORMAL_OFF] [,/BIAS_OFF] [,/EXPTIME_OFF] [,/CALIMG_OFF], [,/DN2P_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_CALIMG(hdr [,CALIMG_FILENAME=filename][,/NEW_CALIMG]

result = EUVI_GET_NORMAL(hdr)

result = GET_CALFAC(hdr)

hdr = SCC_UPDATE_HDR(im, hdr, [/UPDATE_HDR_OFF] [,FILENAME=newfileaname] [,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)

image = SCC_PUTIN_ARRAY(image, hdr, outsize)


Default Procedures

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 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. 

Correction

The photometric correction for EUVI converts the images values from digital number (DN) to the physical units of normalized detected photons. The default photometric correction procedure involves; correcting for SEB IP, subtracting the CCD bias, multiplying by the instrumental calibration image, dividing by the exposure time, normalizing to an OPEN filter and converting the DN to detected photons. Any of these operations can turned off using the keywords.


IDL> result = EUVI_CORRECTION(image, hdr, [,/NORMAL_OFF] [,/BIAS_OFF] [,/EXPTIME_OFF] [,/CALIMG_OFF], [,/DN2P_OFF] [,/SEBIP_OFF] [,/NEW_CALIMG] [,CALIMG_FILENAME=filename])


  • SEB IP - The SEB IP can be set to 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 0.5 header (IP_00_19). The descriptions of the IP functions by number are in Science Operations Manual (MSWord).
  • Normalization - The image is multiplied by factor that normalizes each filter (171, 195, 284, 304 Angstroms ) to a clear filter. This normalization factor corrects for the photometric reduction causes by each filter. The function EUVI_GET_NORMAL returns the correct normalization factor for each filter. 
  • Bias - The mean (BIASMEAN) and standard deviation (BIASSDEV) of the CCD bias will be in the 0.5 header. The function GET_BIASMEAN returns the mean bias from a header. The program corrects the mean bias for SEB IP bias subtraction and SEB IP image summing.
  • Exposure Time - The exposure time (EXPTIME) will be in the 0.5 header. The function GET_EXPTIME returns the correct exposure time for an image.
  • Calibration Image - The calibration image is a FITS file located in $SSW/secchi/calibration (=$SECCHI_CAL). The default calibration image for EUVI_PREP is currently just 1.0 (i.e., no flat field is applied). If required to remove shadowing, user may call secchi_prep with CALIMG_FILE='$SECCHI_CAL/calfilename.fts', where calfilename = 20080416_[grd,raw][171,304]_fCeu[AB]. (There are no flat fields available for 195A and 284A. For details see EUVI calibration page.) The calibration image array is returned by the function GET_CALIMG.pro which crops, scales and rectifies the calibration array to match the image, and gets the date-appropriate version if there is temporal variation. The keyword   /NEW_CALIMG will force re-read of the calibration image from the disk.
  • Photometric Correction - Roughly converts the corrected DN to number of detected photons. To calculate the number of emitted photons requires further processing. The correction factor for each instrument is returned by the function GET_CALFAC. The correction factor can be a time-dependent factor.

Pointing Correction

EUVI_POINT.PRO is used to correct for a long-term drift in pointing from what is predicted from GT sensors. In the header CRPIX1 and CRPIX2 are changed. This may be turned off with the /POINTING_OFF keyword. In addition, there are a bunch of changes in the internal logic that hopefully make it more robust for cases like outdated databases, or SPICE not available. There is some logic in there that tries to decide whether it can actually improve an existing solution, leaving the old one alone if not. SPICE is only used if a roll correction hasn't been made before, or if the program has reason to believe that there is something wrong with the roll. The /forceroll keyword is still there to force a roll update if desired, although this should not be necessary in most cases. A VERSION keyword forces it to return an older solution. For details see the EUVI Pointing page on the SECCHI wiki.

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.


Optional Procedures

Smooth Mask : 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

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.