ISIS Application Documentation
    Runs a raw Messenger cube through ingestion and calibration
  
            Description
              Categories
              Groups
              History
          Description
        
      Runs a raw Messenger cube through ingestion and/or calibration.
     With the optional CDR on, the final output will be a re-exported cdr img.
  
          Categories
        
                Parameter Groups
            
Files
| 
                    Name
                     | 
                    Description
                     | 
| FROM | 
          Input Messenger img
         | 
| TO | 
          Final output filename.
         | 
| BANDS | 
          Process a subset of bands
         | 
| REMOVE | Remove Intermediate Files | 
Level Processing
| 
                    Name
                     | 
                    Description
                     | 
| INGESTION | 
          Import and initialize a Messenger RDR file.
         | 
| CALIBRATION | 
          Process the input file through the calibration phase.
         | 
| TRIM | Trim off poor left pixles | 
| CDR | Export the calibrated image to cdr | 
Calibration
| 
                    Name
                     | 
                    Description
                     | 
| DARKCURRENT | Dark current calibration method | 
| IOF | 
          Convert to I/F units
         | 
CDR
| 
                    Name
                     | 
                    Description
                     | 
| BITS | 
            Number of bits for the output DN
           | 
Files:
                        FROM
                         Description
                       
          Input filename to be ingested, calebrated, and possibly re-exported into a cdr.
        
| 
                             Type
                            | filename | 
| 
                               File Mode
                              | input | 
| 
                               Filter
                              | 
          *.QUB *.imq *.ima *.img *.cub
         | 
 
Files:
                        TO
                         Description
                       
          Output filename from the last enabled processing sequence. By
          default the filename will be generated from the input filename with an
          .cdr.IMG extension.
        
| 
                             Type
                            | cube | 
| 
                               File Mode
                              | output | 
| 
                               Internal Default
                              | Automatic | 
 
Files:
                        BANDS
                         Description
                       
          This parameter allows the user to specify a sub-set of
          bands to process.  Enter bands separated by commas (no spaces
          allowed).  For example, 1,3,8 or 1-3,9 or 5
        
| 
                             Type
                            | string | 
| 
                               Internal Default
                              | All | 
 
Files:
                        REMOVE
                         Description
                       
            This option allows the user to decide whether the intermediate files 
            created in the thmproc application are to be deleted.  The default value
            is TRUE.
        
| 
                             Type
                            | boolean | 
| 
                               Default
                              | TRUE | 
 
Level Processing:
                        INGESTION
                         Description
                       
          Process the input file through all level0 steps. This includes mdis2isis.
        
 
Level Processing:
                        CALIBRATION
                         Description
                       
          Process the input file through level1. This includes mdiscal.
        
| 
                             Type
                            | boolean | 
| 
                               Default
                              | YES | 
| 
                               Inclusions
                              | 
 | 
 
Level Processing:
                        TRIM
                         Description
                       
          Removes the first few pixels of each line of the final cdr prouct.
        
 
Level Processing:
                        CDR
                         Description
                       
          
Exports the calibrated cube back into cdr format.
          If only this step needs to be ran, use mdis2pds instead.
        
| 
                             Type
                            | boolean | 
| 
                               Default
                              | FALSE | 
| 
                               Inclusions
                              | 
 | 
 
Calibration:
                        DARKCURRENT
                         Description
                       
| 
                             Type
                            | string | 
| 
                               Default
                              | MODEL | 
| 
                               Option List:
                              | 
| 
                                   Option | 
                                   Brief | 
                                   Description | 
 
| NONE | No correction | 
                No dark current correction will be applied
               | 
 
| STANDARD | Do a median dark current correction | 
                  This will use the median of the three leftmost pixels to as 
                  the dark current, on a line by line basis. 
               | 
 
| LINEAR | Use a linear fit | 
              This will fit a line to the leftmost pixel values, which should be 
              dark current data, through the lines. The equation derived from 
              these pixels will be used to calculate the dark current 
              correction, on a line by line basis.
             | 
 
| MODEL | Use pre-developed model | 
               Messenger has independent dark models, developed on-ground. 
               This will use the most recent of these models to correct the dark
               current.
               | 
 
 
 | 
 
Calibration:
                        IOF
                         Description
                       
            
            This option when set wil convert the output to I/F from radiance values.  
            To convert from radiance to I/F (also known as radiance factor, the ratio 
            of measured radiance to that which would be measured from a white 
            perfectly Lambertian surface), the following expression should is applied: 
            
I_over_F(f) = L(f) * PI * (SOLAR_DISTANCE/149597870.691)**2 / F(f)                
             
            where L(f) is calibrated radiance calculated for some filter f,
            SOLAR_DISTANCE is that value for distance of the target object from
            the center of the sun in kilometers (as indicated by the keyword
            SOLAR_DISTANCE), 149597870.691 is the number of kilometers in 1 AU
            and F(f) is effective average solar irradiance sampled under the
            filter bandpass.
            
            
                If the observed target is not of a valid body as recognized by 
                NAIF, the output is left in radiance.
            
        
| 
                             Type
                            | boolean | 
| 
                               Default
                              | True | 
 
CDR:
                        BITS
                         Description
                       
            The number of bits to compress the input data to. The valid data as
            well as the five special pixel values (NULL, LIS, LRS, HIS, HRS) will be
            compressed into this number of bits. The output data type will be
            automaticity choosen using this value. A value of 8 will create 
            unsigned byte output files. Values from 9 to 16 will create unsigned
            word output files. Unused bits in the unsigned word output file will be
            set to zero.
          
| 
                             Type
                            | integer | 
| 
                               Default
                              | 32 | 
| 
                               Minimum
                              | 8
                                   (inclusive)
                                  | 
| 
                               Maximum
                              | 32
                                   (inclusive)
                                  | 
 
              History
          
| Christopher Austin | 2008-08-12 | 
      Original version
     | 
| Christopher Austin | 2008-08-21 | 
      Fixed the trim option and added a test for it.
     |