Standard THEMIS IR Processing with ISIS3

From DavinciWiki
(Difference between revisions)
Jump to: navigation, search
Line 7: Line 7:
 
Run isis3setup().
 
Run isis3setup().
 
  dv> isis3setup()
 
  dv> isis3setup()
 +
 +
  
 
[[drift|Undrift]] and [[wobble|Dewobble]] the unprojected [[RDR]] data.  There are several options to [[uddw]] that require access to the ASU Mars Space Flight Facility Database and file structure. The method described below requires none of these <<is this still true?>>.
 
[[drift|Undrift]] and [[wobble|Dewobble]] the unprojected [[RDR]] data.  There are several options to [[uddw]] that require access to the ASU Mars Space Flight Facility Database and file structure. The method described below requires none of these <<is this still true?>>.
 
  dv>a &#61; uddw("I10418002",isis3struct &#61; 1)
 
  dv>a &#61; uddw("I10418002",isis3struct &#61; 1)
 +
 +
  
 
Remove cross-cube temperature gradients using [[rtilt|Rtilt]]. This step could be skipped if the cube is being processed for spectral analysis, but is highly recommended for DCS analysis and aesthetics. See Edwards et al. (2011) mosaicking paper for details.
 
Remove cross-cube temperature gradients using [[rtilt|Rtilt]]. This step could be skipped if the cube is being processed for spectral analysis, but is highly recommended for DCS analysis and aesthetics. See Edwards et al. (2011) mosaicking paper for details.
 
  dv> a &#61; rtilt(a)
 
  dv> a &#61; rtilt(a)
 +
 +
  
 
Load in the PDS formatted cube to access backplanes, SPICE kernel data, etc.
 
Load in the PDS formatted cube to access backplanes, SPICE kernel data, etc.
 
  dv> isis &#61; load_pds("I10418002.isis3.cub")
 
  dv> isis &#61; load_pds("I10418002.isis3.cub")
 +
  
  
 
Replace the data part of the ISIS cube with the corrected cube
 
Replace the data part of the ISIS cube with the corrected cube
 
  dv> isis.cube &#61; a
 
  dv> isis.cube &#61; a
 +
  
  
Line 25: Line 33:
 
  dv> write(isis,"I10418002.isis3.uddw.rtilt.cub",type &#61; isis3, force &#61; 1)
 
  dv> write(isis,"I10418002.isis3.uddw.rtilt.cub",type &#61; isis3, force &#61; 1)
  
Outside of davinci (in the terminal), attach SPICE data to corrected cube:
 
  
 +
 +
Outside of davinci (in the terminal), attach SPICE data to corrected cube:
 
(1) Open SPICE GUI: spiceinit
 
(1) Open SPICE GUI: spiceinit
 
(2) Select corrected ISIS cube.
 
(2) Select corrected ISIS cube.
 
(3) Default options are ok, but also add "Compute nadir pointing if no other kernels exist"
 
(3) Default options are ok, but also add "Compute nadir pointing if no other kernels exist"
 
(4) Click green go button.
 
(4) Click green go button.
 +
  
  
 
Also in the terminal, project the data using the ISIS projection software:
 
Also in the terminal, project the data using the ISIS projection software:
(1) Open ISIS GUI: cam2map
+
(1) Open ISIS GUI: cam2map.
 
(2) Select input, output cubes. Recommended output name includes "sinu" as a modifier (e.g., I10418002.isis3.uddw.rtilt.sinu.cub).
 
(2) Select input, output cubes. Recommended output name includes "sinu" as a modifier (e.g., I10418002.isis3.uddw.rtilt.sinu.cub).
 
(3) Change projection if desired (default is sinusoidal). To create a custom projection, enter maptemplate in terminal.
 
(3) Change projection if desired (default is sinusoidal). To create a custom projection, enter maptemplate in terminal.
(4) Set interp to bi-linear
+
(4) Set interp to bi-linear.
 
(5) Click green go button.
 
(5) Click green go button.
 
  
  
Line 45: Line 54:
 
Back in davinci, run isis3setup() again.
 
Back in davinci, run isis3setup() again.
 
  dv> isis3setup()
 
  dv> isis3setup()
 +
  
  
Line 53: Line 63:
 
Remove spectra that don't have all 10 bands.
 
Remove spectra that don't have all 10 bands.
 
  dv> a.cube[where min(a.cube,axis &#61; z)< -2] &#61; -32768
 
  dv> a.cube[where min(a.cube,axis &#61; z)< -2] &#61; -32768
 +
 +
  
 
Rectify the image, which rotates and slightly warps the projected image into a rectangle for easy manipulation and to minimize storage requirements.
 
Rectify the image, which rotates and slightly warps the projected image into a rectangle for easy manipulation and to minimize storage requirements.
 
  dv>a &#61; thm.rectify(a.cube,ignore &#61; -32768)
 
  dv>a &#61; thm.rectify(a.cube,ignore &#61; -32768)
 +
  
 
Remove the line and row correlated noise [[plaid]].  Setting the output to a.data replaces the radiance cube.
 
Remove the line and row correlated noise [[plaid]].  Setting the output to a.data replaces the radiance cube.
 
  dv> a.data &#61; thm.deplaid(a.data, ignore &#61; -32768)
 
  dv> a.data &#61; thm.deplaid(a.data, ignore &#61; -32768)
 +
  
 
Call the automatic radiance correction function to calculate the contribution of atmospheric dust to the measured radiance.  The returned structure has the element '.darkcol', which is a column of correction values that need to be subtracted from the radiance.
 
Call the automatic radiance correction function to calculate the contribution of atmospheric dust to the measured radiance.  The returned structure has the element '.darkcol', which is a column of correction values that need to be subtracted from the radiance.
 
  dv> rc &#61; autoradcorr(a.data, ignore &#61; -32768)
 
  dv> rc &#61; autoradcorr(a.data, ignore &#61; -32768)
 +
  
 
Subtract the column of correction values from the data where the array is not the ignore value.
 
Subtract the column of correction values from the data where the array is not the ignore value.
Line 67: Line 82:
  
  
Remove the noise known as [[destreak|Streak]].
+
Remove the noise known as [[destreak|streak]].
  dv> a=destreak(a, ignore &#61; -32768)
+
  dv> a &#61; destreak(a, ignore &#61; -32768)
  
  
 
Optional step: Remove [[thm.white_noise_remove2|white noise]]. Only recommended for qualitative products (e.g., DCS).
 
Optional step: Remove [[thm.white_noise_remove2|white noise]]. Only recommended for qualitative products (e.g., DCS).
  dv> a=thm.white_noise_remove2(a, ignore &#61; -32768)
+
  dv> a &#61; thm.white_noise_remove2(a, ignore &#61; -32768)
  
 
Return the data to its original map projection.  This reverses the rectify step.
 
Return the data to its original map projection.  This reverses the rectify step.

Revision as of 16:48, 30 January 2012

Description

This procedure is designed to take an ISIS projected THEMIS Infrared image and run it through "standard processing", correcting for noises and producing an emissivity array.

The data output of this should be similar to what can be generated using thmproc. However, thmproc currently uses ISIS2, so this method uses updated projection techniques and SPICE kernels.

NOTE: The example is shown for data containing 10 bands. If less bands are present, such as in a nighttime image, you can safely skip the autoradcorr step.

Procedure

Run isis3setup().

dv> isis3setup()


Undrift and Dewobble the unprojected RDR data. There are several options to uddw that require access to the ASU Mars Space Flight Facility Database and file structure. The method described below requires none of these <<is this still true?>>.

dv>a = uddw("I10418002",isis3struct = 1)


Remove cross-cube temperature gradients using Rtilt. This step could be skipped if the cube is being processed for spectral analysis, but is highly recommended for DCS analysis and aesthetics. See Edwards et al. (2011) mosaicking paper for details.

dv> a = rtilt(a)


Load in the PDS formatted cube to access backplanes, SPICE kernel data, etc.

dv> isis = load_pds("I10418002.isis3.cub")


Replace the data part of the ISIS cube with the corrected cube

dv> isis.cube = a


Write out the corrected ISIS cube

dv> write(isis,"I10418002.isis3.uddw.rtilt.cub",type = isis3, force = 1)


Outside of davinci (in the terminal), attach SPICE data to corrected cube: (1) Open SPICE GUI: spiceinit (2) Select corrected ISIS cube. (3) Default options are ok, but also add "Compute nadir pointing if no other kernels exist" (4) Click green go button.


Also in the terminal, project the data using the ISIS projection software: (1) Open ISIS GUI: cam2map. (2) Select input, output cubes. Recommended output name includes "sinu" as a modifier (e.g., I10418002.isis3.uddw.rtilt.sinu.cub). (3) Change projection if desired (default is sinusoidal). To create a custom projection, enter maptemplate in terminal. (4) Set interp to bi-linear. (5) Click green go button.


Back in davinci, run isis3setup() again.

dv> isis3setup()


Read in the ISIS map projected 10 band THEMIS infrared image.

dv>a = load_pds("I10418002.isis3.uddw.rtilt.sinu.cub")


Remove spectra that don't have all 10 bands.

dv> a.cube[where min(a.cube,axis = z)< -2] = -32768


Rectify the image, which rotates and slightly warps the projected image into a rectangle for easy manipulation and to minimize storage requirements.

dv>a = thm.rectify(a.cube,ignore = -32768)


Remove the line and row correlated noise plaid. Setting the output to a.data replaces the radiance cube.

dv> a.data = thm.deplaid(a.data, ignore = -32768)


Call the automatic radiance correction function to calculate the contribution of atmospheric dust to the measured radiance. The returned structure has the element '.darkcol', which is a column of correction values that need to be subtracted from the radiance.

dv> rc = autoradcorr(a.data, ignore = -32768)


Subtract the column of correction values from the data where the array is not the ignore value.

dv>a.data[where a.data != -32768] = a.data-rc.darkcol


Remove the noise known as streak.

dv> a = destreak(a, ignore = -32768)


Optional step: Remove white noise. Only recommended for qualitative products (e.g., DCS).

dv> a = thm.white_noise_remove2(a, ignore = -32768)

Return the data to its original map projection. This reverses the rectify step.

dv> a = thm.reconstitute(a)
577x1852x10 array of float, bsq format [42,744,160 bytes]


DavinciWiki Mini-Nav Bar

Contents


Contact Developers

  • davinci-dev [AT] mars.asu.edu

All other topics

  • See navigation on the left

Personal tools