DICAL README                                                                  
------------------------------                                                
                                                                              
PROJECT COMPONENTS                                                            
-------------------                                                           
                                                                              
DICAL                                                                         
  - The main calibration routine. This guy is the workhorse and does the      
    actual calibration                                                        
                                                                              
DICAL_GUI                                                                     
  - Graphical front-end to DICAL                                              
                                                                              
DICAL_CONFIG                                                                  
  - Graphical utility to specify where DICAL will get calibration data        
                                                                              
                                                                              
FILES                                                                         
-------                                                                       
                                                                              
DICAL* - Mostly modules in the calibration pipeline and definition files      
for the pipeline. The two exceptions are DICAL_GUI and DICAL_CONFIG which     
are separate parts of the project.                                            
GUI* - Files for the DICAL_GUI front end                                      
Everything else - Tools used in numerous modules                              
                                                                              
                                                                              
RUNNING THE PIPELINE                                                          
--------------------                                                          
                                                                              
For command line running, see the documentation in DICAL                      
                                                                              
For graphically running, use DICAL_GUI. A single image can be calibrated      
by opening the raw FITS file. For batch processing, open a text file with     
a different file name on each line.                                           
                                                                              
                                                                              
ACESSING CALIBRATION FILES                                                    
--------------------------                                                    
                                                                              
All of the calibration files are stored on the SDC in:                        
                                                                              
.../DeepImpact/Data/Cal/                                                      
                                                                              
Each sub directory specifies a different type of calibration file.            
All of the files are named using the following format:                        
                                                                              
<Instrument>-YYMMDD-<Mode>-<Filter || Temperature>.fit                        
                                                                              
For example, a spectral map valid for images after May 6, 2004 for            
IR mode 3 at 135.23K would be labeled: HRIIR-040506-3-135_23.fit              
                                                                              
Pointers to all of these files are stored in an SQL database along with       
some extra calibration data. To access any calibration data, use the          
DI_SQLQuery routine. If the query returns a remote filename, then use         
the getLocFn routine to convert the remote filename into a local one.         
If needed, the file is downloaded using wget.                                 
                                                                              
To update the database, use resetdb_dical.sh followed by filldb_dical.csh.    
Both of these files are found in the Db/ directory.                           
                                                                              
                                                                              
WHEN NEW CALIBRATION FILES ARRIVE                                             
---------------------------------                                             
                                                                              
When calibration files arrive, they are usually not in a compatible           
format. To fix this, they must be converted to FITS files with the            
filename format mentioned above. Since each source is different, I            
have created scripts/programs as I need them to convert the files.            
All of these are scattered throughout the Data/ directory. Once the           
files are converted, they need to be moved to the proper calibration          
files directory and the database needs to be updated.                         
                                                                              
For data that is only stored in the SQL database, like the wavelength         
for each VIS filter, there is a script/program in the Db/ directory           
that is called by filldb_dical.csh                                            
                                                                              
FILE HISTORY                                                                  
------------------------------                                                
Created - Mark Desnoyer(md246@cornell.edu) Feb 11,