@@ -4,19 +4,15 @@ author: E. Todd Bradley
44(sec: cube_gen )=
55# Cube Generator
66
7- :::{note} Chapter conversion status
8- Text was copied raw, figures and tables still missing.
9- :::
10-
117## Introduction <!-- 12.1 -->
128
139Cube Generator (CG) is an IDL widget to read and process raw Cassini UVIS data files,
1410and combine the processed data with geometric parameters as calculated by Josh Colwell’s
15- Geometer Engine into an _ Image Cube_ for use in further investigations. Users are given a variety
16- of options regarding the processing of the data and geometer options. This document provides a
17- reference and tutorial for new users to CG. After a brief introduction and comments regarding
18- the installation and compiling of CG, the tutorial is written in the order a typical user would use
19- to create an image cube from raw data.
11+ Geometer Engine into an _ Image Cube_ for use in further investigations.
12+ Users are given a variety of options regarding the processing of the data and geometer options.
13+ This document provides a reference and tutorial for new users to CG.
14+ After a brief introduction and comments regarding the installation and compiling of CG, the tutorial is
15+ ritten in the order a typical user would use to create an image cube from raw data.
2016
2117## Installation <!-- 12.2 -->
2218
@@ -31,11 +27,13 @@ been renamed to avoid confusion or conflict with previously extant code.
3127Cube Generator requires at least IDL 5.5 and the ICY spice interface, available from
3228ftp://naif.jpl.nasa.gov/pub/naif/toolkit/IDL/.
3329To run CG, compile and run ** _ cube_generator.pro_ ** , either from the command line or via
34- the IDL development environment. If successful, the following widget will be realized (Figure
35- 12.1).
30+ the IDL development environment. If successful, the following widget will be realized ({ref}` fig:cg_options ` ).
3631
37- ```
38- Figure 12.1: Base level menu for Cube Generator.
32+ ``` {figure} figures/fig_12.1.png
33+ :label: "fig:cg_options"
34+ :width: 75%
35+ :align: left
36+ Base level menu for Cube Generator.
3937```
4038
4139On the left half of the widget, a series of inputs and menu buttons provide access to the
@@ -54,6 +52,7 @@ label file must be downloaded and placed in the same directory as the data file.
5452image cube from a single data file, simply click on the ‘Input Single File’ button. A file selection
5553dialog will open allowing the user to navigate to where the file is saved on their computer and
5654select it for input.
55+
5756In the case of an observation that consists of more than one raw file, the user will select
5857the ‘Input Batch File’ button. The program is asking for a text file that lists the names of all the
5958data files to be combined into a single cube _ in the order they are listed in the file._ Cube
@@ -65,10 +64,13 @@ of a text file.
6564## Output Formats <!-- 12.5 -->
6665
6766Selecting the ‘Output Formats’ button will change the menu options on the left half of the
68- Cube Generator widget as follows (see Figure 12.2 ).
67+ Cube Generator widget as follows (see {ref} ` fig:cg_output ` ).
6968
70- ```
71- Figure 12.2: File Output options menu
69+ ``` {figure} figures/fig_12.2.png
70+ :label: "fig:cg_output"
71+ :width: 75%
72+ :align: left
73+ File Output options menu
7274```
7375
7476Users have the option of outputting the image cube in four basic formats; ‘Envi’,
@@ -81,12 +83,15 @@ to reset an IDL session after the creation of each cube due to changing structur
8183strongly suggested that users create cubes in the ‘Improved’ format.** For further details on
8284the structure of both the ‘Original’ and ‘Improved’ save file formats, see Appendix 1 at the end
8385of the document.
86+
8487The ‘ENVI’ output format creates an image cube and associated header that can be read
8588by the _ ENVI_ image processing package. _ ENVI_ is an IDL extension that must be purchased
8689separately from ITT.
90+
8791Finally, the ‘Binary’ output format is simply a binary array of double float values. Note
8892that there is no information in the Binary format to inform a user as to the dimensions of the
8993included data.
94+
9095The ‘Output File’ button will open a selection dialog that allows the user to select the
9196name and location where the image cube will be written.
9297When the user has selected the output format and file names, press return to change the menu
@@ -97,12 +102,14 @@ back to the base screen (Figure 12.1).
97102Back at the base level menu, the user has a few options that relate to the calculation of the
98103geometric parameters or the processing of the raw data. These options are generally left at their
99104default state, though some special cases may require their modification.
105+
100106First, the boxed sub-menu labeled ‘Aberation’. This option affects how Geometer will
101107calculate the geometric parameters. The default setting of ‘LT’ commands geometer to calculate
102108the state variables as corrected for light-time. ‘None’ does not correct for light-time and ‘LT+S’
103109corrects for light-time and stellar aberrations. For many observations, the difference between
104110aberration states would likely be negligible. However, given the possible non-negligible effect on
105111some calculations, the ‘LT’ correction is set as default.
112+
106113To the right of the aberration box is the time segment box. Users may select any
107114combination of three discrete times within an integration period to retrieve geometry.
108115“Beginning” is at the start of the integration period, “Middle” is at half of an integration period,
@@ -111,40 +118,45 @@ For each time period, a separate structure will be returned, denoted by “datas
111118datastruct2, and datastruct2_final, for the three time periods, with geometry within each for the
112119selected time periods. If a time period is not selected, then that particular structure contains a
113120zero.
121+
114122Below the aberration selection menu is a box used to select the pointing reference, which
115123may be Solar, c kernel (the default setting), or Star. In the case of Solar or Star the pointing of
116124the instrument is referenced to the vector between the instrument and either the Sun or a star. If
117125“Star” is selected an input box appears requiring that the name of the star be entered.
126+
118127Below the pointing box is a check-box that allows the user to select between two types of
119128background subtraction, RTG or spectral average. If RTG is selected, the text box will become
120-
121-
122129active and, if the user chooses, a new RTG noise value may be entered. Cube Generator will
123130subtract from each pixel an RTG noise level based on this value and the integration length of
124131each observation record. ** If a new RTG correction value is entered, the user MUST press
125132return for IDL to record the new value.** If “Spectral Average” is selected the user must enter
126133upper and lower spectral bounds, which results in the average of the raw counts over that spectral
127134interval to be subtracted from the raw counts.
135+
128136Below the “Background Subtraction” box lies another check-box labeled ‘Override
129137Kernel Check?’. If selected, this will force CG to continue and make an image cube despite
130138errors from the called SPICE routines that indicate insufficient kernel data to calculate geometric
131139information. Generally, it is in the users interest to allow C-kernel errors to interrupt CG,
132140however there are some cases in which an error may be ignored.
133- Below the “Override Kernel Check” is a pull down ‘Target Name’ menu, as shown in
134- Figure 12.3. The user is required to manually select the _ Target_ relative to which Geometer will
141+
142+ Below the “Override Kernel Check” is a pull down ‘Target Name’ menu, as shown in {ref}` fig:cg_target ` .
143+ The user is required to manually select the _ Target_ relative to which Geometer will
135144calculate the relevant parameters. If no target is selected (or the Ra/Dec target is selected without
136145changing the values to the right), CG will declare an error and interrupt the image cube creation
137146process. If the user wants to calculate parameters relative to a fixed Ra/Dec value, select Ra/Dec
138147as the target and modify the values to the right of the pull down menu (remembering to hit return
139148in each field to register the changes with IDL).
140149
141- ```
142- Figure 12.3: Target Name pull-down menu.
150+ ``` {figure} figures/fig_12.3.png
151+ :label: "fig:cg_target"
152+ :width: 100%
153+ :align: left
154+ Target Name pull-down menu.
143155```
144156
145157## Flatfielding Options <!-- 12.7 -->
146158
147- For general use, this menu (Figure 12.4 ) will not need to be accessed. The default setting
159+ For general use, this menu ({ref} ` fig:cg_flatfield ` ) will not need to be accessed. The default setting
148160will process the raw data according to the team-sponsored procedure. The default processing
149161scheme corrects the raw data by the following steps.
150162
@@ -157,42 +169,54 @@ scheme corrects the raw data by the following steps.
1571695 . Export corrected data.
158170
159171Should a user want to eliminate of modify any of the steps above, the _ Ala Carte_ menu
160- exists to allow flexibility and is accessed by deselecting the ‘Full Flatfielding Routine’,
161- Figure12. 4.
172+ exists to allow flexibility and is accessed by deselecting the ‘Full Flatfielding Routine’ in {ref}` fig:cg_flatfield ` .
162173
163- ```
164- Figure 12.4: Flatfielding Processing Menu
174+ ``` {figure} figures/fig_12.4.png
175+ :label: "fig:cg_flatfield"
176+ :width: 100%
177+ :align: left
178+ Flatfielding Processing Menu
165179```
166180The _ Ala Carte_ flatfielding menu allows the user to select which ground calibration to
167181apply, 1997, 1999, 2003, or 2004, whether to apply the Red Patch, how to handle NaN’s, and
168-
169-
170182which flatfield to use. The calibration and flatfields both have the multiplicative modifiers
171183applied to them.
184+
172185Some options within the _ Ala Carte_ menu preclude other selections. For instance,
173186selection of the “No NaNs (Ian Stewart)” flatfield will override the user’s selection of a ‘NaN
174187Handling Approach’ as those selections no longer have any meaning. Similarly, choosing to
175188apply no calibration will automatically disable the FUV Red Patch, regardless of whether the
176189patch was selected to be applied by the user from the Flatfielding menu.
190+
177191Each of the choices under the ‘Calibration Choice’ refer to the year of a lab calibration. If
178192the 1999 lab calibration (the default setting) is selected, and the inputted data set is an FUV
179193observation, the derived correction factor of 0.91 is applied automatically. Selection of any of the
180194other calibrations WILL NOT have a correction factor applied.
195+
181196If the user checks the box next to the ‘Override all Options?’ label, NO calibrations or
182197flatfields will be applied to the data. The output in this case would be simply raw data and the
183198geometric information.
184199
185200## SPICE Kernels <!-- 12.8 -->
186201
187- The SPICE Kernel Options menu (Figure 12.5 ) provides a series of tools to manage the
202+ The SPICE Kernel Options menu ({ref} ` fig:cg_spice ` ) provides a series of tools to manage the
188203SPICE kernels accessed by Geometer to calculate the geometric parameters included in the
189204image cube. SPICE kernels loaded into memory via the ICY routines stay resident in memory
190205until IDL is shut down. Resetting the IDL session ** DOES NOT** clear SPICE kernels from
191206memory. Thus, when processing a large number of files, it is possible to have many, and possibly
192207conflicting, kernels loaded.
208+
209+ ``` {figure} figures/fig_12.5.png
210+ :label: "fig:cg_spice"
211+ :width: 100%
212+ :align: left
213+ SPICE Kernel Options menu.
214+ ```
215+
193216The first option in this menu will list all the SPICE kernels currently in memory in the
194217right hand text box. This is useful for when CG aborts due to a C-kernel error. Examining the
195218loaded kernels may identify the missing kernel.
219+
196220To load a single kernel into memory, user the ‘Load a Kernel’ button. A file selection
197221dialog will open and, if successful, the Processing Status box will confirm loading of the kernel.
198222The user may also load a series of kernels simultaneously via the ‘Load Kernel Batch’ button.
@@ -201,14 +225,12 @@ contains the paths and names of the desired kernels. And, as with the single ker
201225option, a successful operation will be indicated in the status box. Alternatively the user may
202226choose to load spice kernels independently of Cube Generator as long as the kernels are loaded
203227into the numerical processing software (e.g., IDL) before running Cube Generator.
228+
204229Finally, the ‘Unload All Kernels’ button will force IDL to clear all SPICE kernels from
205230memory. If you are concerned that the wrong kernel might be used to calculate the geometry, use
206231this to clear memory and then re-load the specific kernels you want to use.
207232
208233
209- ```
210- Figure 12.5: SPICE Kernel Options menu.
211- ```
212234A quick note about the loading of SPICE kernels. The ICY interface ** requires** that the
213235first kernel in memory be the leap second correction kernel (LSK). Thus, when loading, make
214236sure that is either the first loaded or the first entry in the text batch file. In addition, the latest
@@ -230,9 +252,9 @@ displayed.
230252At the base level menu, there are two final buttons that haven’t been described. Both are
231253so self-explanatory that they shouldn’t require any mention, but to be insanely complete, a few
232254words.
233- ‘Help’ opens an abridged version of this document within the widget framework for
255+ - ‘Help’ opens an abridged version of this document within the widget framework for
234256quick reference as needed.
235- ‘Exit’ exits.
257+ - ‘Exit’ exits.
236258
237259
238260## Examples of Restoring the Contents of Variables <!-- 12.11 -->
@@ -241,18 +263,20 @@ Suppose that one needs to look at the calibrated data, denoted by the variable n
241263“UVIS” and compare this to the pixel center longitude determined at the middle of the
242264integration period. In IDL the code would be written as follows:
243265
266+ ``` {code} idl
244267Restore,filename
245268UVIS = datastruct2.UVIS
246269Pixel_center_longitude = datastruct2.pixel_center_longitude
247-
270+ ```
248271Alternatively suppose one needs to look at the raw counts and compare this to the pixel center
249272phase angle for geometry determined at the beginning of the integration period. In IDL the code
250273would be as follows:
251274
275+ ``` idl
252276Restore,filename
253277Rawcounts = datastruct2_initial.rawcounts
254- Pixel_center_phase_angle =
255- datastruct2_initial.pixel_center_phase_angle
278+ Pixel_center_phase_angle = datastruct2_initial.pixel_center_phase_angle
279+ ```
256280
257281By default, the number of spatial pixels is 64 and the number of spectral pixels is 1024.
258282However observations do not always make use of all of the spatial or spectral pixels depending
0 commit comments