Isis 3.0 Application Source Code Reference |
Home |
00001 #ifndef DARKCURRENT_H 00002 #define DARKCURRENT_H 00003 /** 00004 * @file 00005 * $Revision: 1.3 $ 00006 * $Date: 2009/05/27 21:26:15 $ 00007 * 00008 * Unless noted otherwise, the portions of Isis written by the USGS are public 00009 * domain. See individual third-party library and package descriptions for 00010 * intellectual property information,user agreements, and related information. 00011 * 00012 * Although Isis has been used by the USGS, no warranty, expressed or implied, 00013 * is made by the USGS as to the accuracy and functioning of such software 00014 * and related material nor shall the fact of distribution constitute any such 00015 * warranty, and no responsibility is assumed by the USGS in connection 00016 * therewith. 00017 * 00018 * For additional information, launch 00019 * $ISISROOT/doc//documents/Disclaimers/Disclaimers.html in a browser or see 00020 * the Privacy & Disclaimers page on the Isis website, 00021 * http://isis.astrogeology.usgs.gov, and the USGS privacy and disclaimers on 00022 * http://www.usgs.gov/privacy.html. 00023 */ 00024 00025 #include <string> 00026 #include <vector> 00027 #include "Filename.h" 00028 00029 using namespace std; 00030 00031 namespace Isis { 00032 class CissLabels; 00033 /** 00034 * @brief Compute Cassini ISS dark current subtraction 00035 * 00036 * This class was created in order to perform necessary 00037 * calculations for computing the two-dimensional dark current 00038 * array to be subtracted from Cassini ISS images during 00039 * calibration using the <B>Isis cisscal</B> application. 00040 * 00041 * @ingroup Cassini 00042 * @author 2008-11-05 Jeannie Walldren 00043 * @internal 00044 * @history 2008-11-05 Jeannie Walldren - Original Version 00045 * @history 2009-01-26 Jeannie Walldren - Changed declarations of 2 00046 * dimensional vectors 00047 * @history 2009-05-27 Jeannie Walldren - Added p_flightSoftware variable. 00048 * Updated ComputeLineTime() code with algorithm from 00049 * the new version of linetime.pro in idl cisscal 3.6. 00050 * Fixed instrument data rate value in the 00051 * constructor. 00052 * @history 2010-07-19 Jeannie Walldren - Fixed formatting. 00053 */ 00054 class DarkCurrent { 00055 public: 00056 // implied open file 00057 DarkCurrent(CissLabels &cissLab); 00058 ~DarkCurrent() {}; //!< Empty Destructor 00059 00060 vector <vector <double> > ComputeDarkDN(); 00061 //! Retrieves the name of the bias distortion table 00062 Filename BiasDistortionTable() { 00063 return p_bdpath; 00064 }; 00065 //! Retrieves the name of the dark parameters file 00066 Filename DarkParameterFile() { 00067 return p_dparamfile; 00068 }; 00069 00070 00071 private: 00072 double ComputeLineTime(int lline); 00073 void FindDarkFiles(); 00074 void ComputeTimeArrays(); 00075 vector <vector <double> > MakeDarkArray(); 00076 vector <vector <double> > MakeManyLineDark(Brick &darkBrick); 00077 00078 00079 int p_lines; //!< Number of lines in the image. 00080 int p_samples; //!< Number of samples in the image. 00081 Filename p_bdpath; //!< Bias distortion table for the image. Only exists for narrow camera images. 00082 Filename p_dparamfile; //!< Dark parameters file for the image. 00083 00084 //LABEL VARIABLES 00085 int p_btsm; //!< Value dependent upon <b>PvlKeyword</b> DelayedReadoutFlag. Valid values are: "No"=0, "Yes"=1, "Unknown"=-1. Called "botsim" or "btsm" in IDL code. 00086 double p_compRatio; //!< Value of <b>PvlKeyword</b> CompressionRatio from the labels of the image. Called "ratio" in IDL code. 00087 string p_compType; //!< Value of <b>PvlKeyword</b> CompressionType from the labels of the image. Called "comp" in IDL code. 00088 string p_dataConvType; //!< Value of <b>PvlKeyword</b> DataConversionType from the labels of the image. Called "conv" in IDL code. 00089 double p_expDur; //!< Value of <b>PvlKeyword</b> ExposureDuration from the labels of the image. Called "exposure" or "time" in IDL code. 00090 iString p_flightSoftware; //!< Value of <b>PvlKeyword</b> FlightSoftwareVersion from the labels of the image. Called "fsw" in IDL code. 00091 int p_gainMode; //!< Value of <b>PvlKeyword</b> GainModeId from the labels of the image. 00092 double p_instDataRate; //!< Value of <b>PvlKeyword</b> InstrumentDataRate from the labels of the image. 00093 bool p_narrow; //!< Indicates whether the image is from a narrow-angle camera 00094 int p_readoutIndex; //!< Value of <b>PvlKeyword</b> InstrumentDataRate from the labels of the image. Called "rdind" or "roindex" in IDL code. 00095 int p_readoutOrder; //!< Value of <b>PvlKeyword</b> ReadoutOrder from the labels of the image. Valid values are: NAC first = 0, WAC first = 1. Called "roo" in IDL code. 00096 iString p_sum; //!< Summing mode, as found in the labels of the image. This integer is created as an iString so that it may be added to a string. Called "sum" in IDL code. 00097 int p_telemetryRate; //!< Telemetry rate of the image in packets per second. This is dependent on the range of the instrument data rate. Called "cdsr" in IDL code. 00098 00099 vector <vector <double> > p_startTime; //!< Array of start times for each pixel of the image. 00100 vector <vector <double> > p_endTime; //!< Array of end times for each pixel of the image. 00101 vector <vector <double> > p_duration; //!< Array of durations for each pixel of the image. 00102 }; 00103 }; 00104 #endif 00105