• Skip to content
  • Skip to link menu
KDE 4.0 API Reference
  • KDE API Reference
  • kdeedu
  • Sitemap
  • Contact Us
 

kstars

ApnCamData_CCD4720B.cpp

Go to the documentation of this file.
00001 
00002 //
00003 // ApnCamData_CCD4720B.cpp:  Implementation file for the CApnCamData_CCD4720B class.
00004 //
00005 // Copyright (c) 2003, 2004 Apogee Instruments, Inc.
00006 //
00008 
00009 #include "ApnCamData_CCD4720B.h"
00010 
00011 #include <stdlib.h>
00012 #include <string.h>
00013 
00015 // Construction/Destruction
00017 
00018 
00019 CApnCamData_CCD4720B::CApnCamData_CCD4720B()
00020 {
00021 }
00022 
00023 
00024 CApnCamData_CCD4720B::~CApnCamData_CCD4720B()
00025 {
00026 }
00027 
00028 
00029 void CApnCamData_CCD4720B::Initialize()
00030 {
00031     strcpy( m_Sensor, "CCD4720B" );
00032     strcpy( m_CameraModel, "4720" );
00033     m_CameraId = 21;
00034     m_InterlineCCD = false;
00035     m_SupportsSerialA = true;
00036     m_SupportsSerialB = true;
00037     m_SensorTypeCCD = true;
00038     m_TotalColumns = 1072;
00039     m_ImagingColumns = 1024;
00040     m_ClampColumns = 24;
00041     m_PreRoiSkipColumns = 0;
00042     m_PostRoiSkipColumns = 0;
00043     m_OverscanColumns = 24;
00044     m_TotalRows = 2058;
00045     m_ImagingRows = 1024;
00046     m_UnderscanRows = 1033;
00047     m_OverscanRows = 1;
00048     m_VFlushBinning = 1;
00049     m_EnableSingleRowOffset = true;
00050     m_RowOffsetBinning = 1033;
00051     m_HFlushDisable = false;
00052     m_ShutterCloseDelay = 0;
00053     m_PixelSizeX = 13;
00054     m_PixelSizeY = 13;
00055     m_Color = false;
00056     m_ReportedGainSixteenBit = 2;
00057     m_MinSuggestedExpTime = 1.0;
00058     m_CoolingSupported = true;
00059     m_RegulatedCoolingSupported = true;
00060     m_TempSetPoint = -20.0;
00061     m_TempRampRateOne = 700;
00062     m_TempRampRateTwo = 4000;
00063     m_TempBackoffPoint = 2.0;
00064     m_PrimaryADType = ApnAdType_Alta_Sixteen;
00065     m_AlternativeADType = ApnAdType_Alta_Twelve;
00066     m_DefaultGainTwelveBit = 400;
00067     m_DefaultOffsetTwelveBit = 200;
00068     m_DefaultRVoltage = 1000;
00069 
00070     set_vpattern();
00071 
00072     set_hpattern_clamp_sixteen();
00073     set_hpattern_skip_sixteen();
00074     set_hpattern_roi_sixteen();
00075 
00076     set_hpattern_clamp_twelve();
00077     set_hpattern_skip_twelve();
00078     set_hpattern_roi_twelve();
00079 }
00080 
00081 
00082 void CApnCamData_CCD4720B::set_vpattern()
00083 {
00084     const unsigned short Mask = 0xE;
00085     const unsigned short NumElements = 129;
00086     unsigned short Pattern[NumElements] = 
00087     {
00088         0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 
00089         0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 
00090         0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 
00091         0x0002, 0x0002, 0x0006, 0x0006, 0x0006, 0x0006, 0x0006, 0x0006, 0x0006, 0x0006, 
00092         0x0006, 0x0006, 0x0006, 0x0006, 0x0006, 0x0006, 0x0006, 0x0006, 0x0006, 0x0006, 
00093         0x0006, 0x0006, 0x0006, 0x0006, 0x0006, 0x0006, 0x0004, 0x0004, 0x0004, 0x0004, 
00094         0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 
00095         0x0004, 0x0004, 0x0004, 0x000C, 0x000C, 0x000C, 0x000C, 0x000C, 0x000C, 0x000C, 
00096         0x000C, 0x000C, 0x000C, 0x000C, 0x000C, 0x000C, 0x000C, 0x000C, 0x000C, 0x000C, 
00097         0x000C, 0x000C, 0x000C, 0x000C, 0x000C, 0x000C, 0x000C, 0x000C, 0x000C, 0x0008, 
00098         0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 
00099         0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 
00100         0x0008, 0x0008, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0001, 0x0000
00101     };
00102 
00103     m_VerticalPattern.Mask = Mask;
00104     m_VerticalPattern.NumElements = NumElements;
00105     m_VerticalPattern.PatternData = 
00106         (unsigned short *)malloc(NumElements * sizeof(unsigned short));
00107 
00108     for ( int i=0; i<NumElements; i++ )
00109     {
00110         m_VerticalPattern.PatternData[i] = Pattern[i];
00111     }
00112 }
00113 
00114 
00115 void CApnCamData_CCD4720B::set_hpattern_skip_sixteen()
00116 {
00117     const unsigned short Mask = 0x2;
00118     const unsigned short BinningLimit = 1;
00119     const unsigned short RefNumElements = 22;
00120     const unsigned short SigNumElements = 8;
00121 
00122     unsigned short RefPatternData[RefNumElements] = 
00123     {
00124         0x006C, 0x0068, 0x006A, 0x006A, 0x1068, 0x1068, 0x1068, 0x0068, 0x00E8, 0x00C8, 
00125         0x00D8, 0x00D8, 0x00D8, 0x00D8, 0x00D0, 0x00D0, 0x00D0, 0x00D0, 0x00D4, 0x00D4, 
00126         0x00D4, 0x00D4
00127     };
00128 
00129     unsigned short SigPatternData[SigNumElements] = 
00130     {
00131         0x0144, 0x0104, 0x0104, 0x0104, 0x0104, 0x0004, 0x0005, 0x0004
00132     };
00133 
00134     unsigned short BinNumElements[APN_MAX_HBINNING] = 
00135     {
00136         0x0002
00137     };
00138 
00139     unsigned short BinPatternData[1][256] = {
00140     {
00141         0x0054, 0x0044
00142     } };
00143 
00144     set_hpattern(   &m_SkipPatternSixteen,
00145                     Mask,
00146                     BinningLimit,
00147                     RefNumElements,
00148                     SigNumElements,
00149                     BinNumElements,
00150                     RefPatternData,
00151                     SigPatternData,
00152                     BinPatternData );
00153 }
00154 
00155 
00156 void CApnCamData_CCD4720B::set_hpattern_clamp_sixteen()
00157 {
00158     const unsigned short Mask = 0x2;
00159     const unsigned short BinningLimit = 1;
00160     const unsigned short RefNumElements = 22;
00161     const unsigned short SigNumElements = 8;
00162 
00163     unsigned short RefPatternData[RefNumElements] = 
00164     {
00165         0x006C, 0x0068, 0x006A, 0x006A, 0x1068, 0x1068, 0x1068, 0x0068, 0x00E8, 0x00C8, 
00166         0x00D8, 0x00D8, 0x00D8, 0x00D8, 0x00D0, 0x00D0, 0x00D0, 0x00D0, 0x00D4, 0x00D4, 
00167         0x00D4, 0x00D4
00168     };
00169 
00170     unsigned short SigPatternData[SigNumElements] = 
00171     {
00172         0x0144, 0x0104, 0x0104, 0x0104, 0x0104, 0x0004, 0x0005, 0x0004
00173     };
00174 
00175     unsigned short BinNumElements[APN_MAX_HBINNING] = 
00176     {
00177         0x0002
00178     };
00179 
00180     unsigned short BinPatternData[1][256] = {
00181     {
00182         0x0054, 0x0044
00183     } };
00184 
00185     set_hpattern(   &m_ClampPatternSixteen,
00186                     Mask,
00187                     BinningLimit,
00188                     RefNumElements,
00189                     SigNumElements,
00190                     BinNumElements,
00191                     RefPatternData,
00192                     SigPatternData,
00193                     BinPatternData );
00194 }
00195 
00196 
00197 void CApnCamData_CCD4720B::set_hpattern_roi_sixteen()
00198 {
00199     const unsigned short Mask = 0x2;
00200     const unsigned short BinningLimit = 6;
00201     const unsigned short RefNumElements = 59;
00202     const unsigned short SigNumElements = 35;
00203 
00204     unsigned short RefPatternData[RefNumElements] = 
00205     {
00206         0x006C, 0x006C, 0x0068, 0x0068, 0x0068, 0x0068, 0x0068, 0x0078, 0x0078, 0x0078, 
00207         0x0078, 0x0078, 0x0070, 0x0070, 0x0074, 0x0074, 0x0076, 0x0076, 0x0076, 0x0074, 
00208         0x0074, 0x0074, 0x0074, 0x0074, 0x0074, 0x1074, 0x1074, 0x0074, 0x0074, 0x0074, 
00209         0x0074, 0x0074, 0x00F4, 0x00F4, 0x00D4, 0x00D4, 0x00D4, 0x00D4, 0x00D4, 0x00D4, 
00210         0x00D4, 0x00D4, 0x00D4, 0x00D4, 0x00D4, 0x00D4, 0x00D4, 0x00D4, 0x00D4, 0x00D4, 
00211         0x00D4, 0x00D4, 0x00D4, 0x00D4, 0x00D4, 0x00D4, 0x00D4, 0x00D4, 0x00D4
00212     };
00213 
00214     unsigned short SigPatternData[SigNumElements] = 
00215     {
00216         0x0044, 0x0044, 0x0044, 0x0144, 0x0144, 0x0104, 0x0104, 0x0104, 0x0104, 0x0104, 
00217         0x0104, 0x0104, 0x0104, 0x0104, 0x0104, 0x0104, 0x0104, 0x0104, 0x0104, 0x0104, 
00218         0x0104, 0x0104, 0x0104, 0x0104, 0x0104, 0x0104, 0x0104, 0x0104, 0x0104, 0x8104, 
00219         0x8104, 0x0004, 0x0004, 0x0405, 0x0404
00220     };
00221 
00222     unsigned short BinNumElements[APN_MAX_HBINNING] = 
00223     {
00224         0x0002, 0x0024, 0x0048, 0x006C, 0x0090, 0x00B4
00225     };
00226 
00227     unsigned short BinPatternData[6][256] = {
00228     {
00229         0x00C4, 0x0044
00230     },
00231     {
00232         0x0044, 0x0044, 0x0044, 0x0044, 0x0044, 0x004C, 0x004C, 0x004C, 0x004C, 0x004C, 
00233         0x0048, 0x0048, 0x0048, 0x0048, 0x0048, 0x0048, 0x0058, 0x0058, 0x0058, 0x0058, 
00234         0x0050, 0x0050, 0x0050, 0x0050, 0x0050, 0x0054, 0x0054, 0x0054, 0x0054, 0x0054, 
00235         0x0054, 0x0044, 0x0044, 0x0044, 0x0044, 0x0044
00236     },
00237     {
00238         0x0044, 0x0044, 0x0044, 0x0044, 0x0044, 0x004C, 0x004C, 0x004C, 0x004C, 0x004C, 
00239         0x0048, 0x0048, 0x0048, 0x0048, 0x0048, 0x0048, 0x0058, 0x0058, 0x0058, 0x0058, 
00240         0x0050, 0x0050, 0x0050, 0x0050, 0x0050, 0x0054, 0x0054, 0x0054, 0x0054, 0x0054, 
00241         0x0054, 0x0044, 0x0044, 0x0044, 0x0044, 0x0044, 0x0044, 0x0044, 0x0044, 0x0044, 
00242         0x0044, 0x004C, 0x004C, 0x004C, 0x004C, 0x004C, 0x0048, 0x0048, 0x0048, 0x0048, 
00243         0x0048, 0x0048, 0x0058, 0x0058, 0x0058, 0x0058, 0x0050, 0x0050, 0x0050, 0x0050, 
00244         0x0050, 0x0054, 0x0054, 0x0054, 0x0054, 0x0054, 0x0054, 0x0044, 0x0044, 0x0044, 
00245         0x0044, 0x0044
00246     },
00247     {
00248         0x0044, 0x0044, 0x0044, 0x0044, 0x0044, 0x004C, 0x004C, 0x004C, 0x004C, 0x004C, 
00249         0x0048, 0x0048, 0x0048, 0x0048, 0x0048, 0x0048, 0x0058, 0x0058, 0x0058, 0x0058, 
00250         0x0050, 0x0050, 0x0050, 0x0050, 0x0050, 0x0054, 0x0054, 0x0054, 0x0054, 0x0054, 
00251         0x0054, 0x0044, 0x0044, 0x0044, 0x0044, 0x0044, 0x0044, 0x0044, 0x0044, 0x0044, 
00252         0x0044, 0x004C, 0x004C, 0x004C, 0x004C, 0x004C, 0x0048, 0x0048, 0x0048, 0x0048, 
00253         0x0048, 0x0048, 0x0058, 0x0058, 0x0058, 0x0058, 0x0050, 0x0050, 0x0050, 0x0050, 
00254         0x0050, 0x0054, 0x0054, 0x0054, 0x0054, 0x0054, 0x0054, 0x0044, 0x0044, 0x0044, 
00255         0x0044, 0x0044, 0x0044, 0x0044, 0x0044, 0x0044, 0x0044, 0x004C, 0x004C, 0x004C, 
00256         0x004C, 0x004C, 0x0048, 0x0048, 0x0048, 0x0048, 0x0048, 0x0048, 0x0058, 0x0058, 
00257         0x0058, 0x0058, 0x0050, 0x0050, 0x0050, 0x0050, 0x0050, 0x0054, 0x0054, 0x0054, 
00258         0x0054, 0x0054, 0x0054, 0x0044, 0x0044, 0x0044, 0x0044, 0x0044
00259     },
00260     {
00261         0x0044, 0x0044, 0x0044, 0x0044, 0x0044, 0x004C, 0x004C, 0x004C, 0x004C, 0x004C, 
00262         0x0048, 0x0048, 0x0048, 0x0048, 0x0048, 0x0048, 0x0058, 0x0058, 0x0058, 0x0058, 
00263         0x0050, 0x0050, 0x0050, 0x0050, 0x0050, 0x0054, 0x0054, 0x0054, 0x0054, 0x0054, 
00264         0x0054, 0x0044, 0x0044, 0x0044, 0x0044, 0x0044, 0x0044, 0x0044, 0x0044, 0x0044, 
00265         0x0044, 0x004C, 0x004C, 0x004C, 0x004C, 0x004C, 0x0048, 0x0048, 0x0048, 0x0048, 
00266         0x0048, 0x0048, 0x0058, 0x0058, 0x0058, 0x0058, 0x0050, 0x0050, 0x0050, 0x0050, 
00267         0x0050, 0x0054, 0x0054, 0x0054, 0x0054, 0x0054, 0x0054, 0x0044, 0x0044, 0x0044, 
00268         0x0044, 0x0044, 0x0044, 0x0044, 0x0044, 0x0044, 0x0044, 0x004C, 0x004C, 0x004C, 
00269         0x004C, 0x004C, 0x0048, 0x0048, 0x0048, 0x0048, 0x0048, 0x0048, 0x0058, 0x0058, 
00270         0x0058, 0x0058, 0x0050, 0x0050, 0x0050, 0x0050, 0x0050, 0x0054, 0x0054, 0x0054, 
00271         0x0054, 0x0054, 0x0054, 0x0044, 0x0044, 0x0044, 0x0044, 0x0044, 0x0044, 0x0044, 
00272         0x0044, 0x0044, 0x0044, 0x004C, 0x004C, 0x004C, 0x004C, 0x004C, 0x0048, 0x0048, 
00273         0x0048, 0x0048, 0x0048, 0x0048, 0x0058, 0x0058, 0x0058, 0x0058, 0x0050, 0x0050, 
00274         0x0050, 0x0050, 0x0050, 0x0054, 0x0054, 0x0054, 0x0054, 0x0054, 0x0054, 0x0044, 
00275         0x0044, 0x0044, 0x0044, 0x0044
00276     },
00277     {
00278         0x0044, 0x0044, 0x0044, 0x0044, 0x0044, 0x004C, 0x004C, 0x004C, 0x004C, 0x004C, 
00279         0x0048, 0x0048, 0x0048, 0x0048, 0x0048, 0x0048, 0x0058, 0x0058, 0x0058, 0x0058, 
00280         0x0050, 0x0050, 0x0050, 0x0050, 0x0050, 0x0054, 0x0054, 0x0054, 0x0054, 0x0054, 
00281         0x0054, 0x0044, 0x0044, 0x0044, 0x0044, 0x0044, 0x0044, 0x0044, 0x0044, 0x0044, 
00282         0x0044, 0x004C, 0x004C, 0x004C, 0x004C, 0x004C, 0x0048, 0x0048, 0x0048, 0x0048, 
00283         0x0048, 0x0048, 0x0058, 0x0058, 0x0058, 0x0058, 0x0050, 0x0050, 0x0050, 0x0050, 
00284         0x0050, 0x0054, 0x0054, 0x0054, 0x0054, 0x0054, 0x0054, 0x0044, 0x0044, 0x0044, 
00285         0x0044, 0x0044, 0x0044, 0x0044, 0x0044, 0x0044, 0x0044, 0x004C, 0x004C, 0x004C, 
00286         0x004C, 0x004C, 0x0048, 0x0048, 0x0048, 0x0048, 0x0048, 0x0048, 0x0058, 0x0058, 
00287         0x0058, 0x0058, 0x0050, 0x0050, 0x0050, 0x0050, 0x0050, 0x0054, 0x0054, 0x0054, 
00288         0x0054, 0x0054, 0x0054, 0x0044, 0x0044, 0x0044, 0x0044, 0x0044, 0x0044, 0x0044, 
00289         0x0044, 0x0044, 0x0044, 0x004C, 0x004C, 0x004C, 0x004C, 0x004C, 0x0048, 0x0048, 
00290         0x0048, 0x0048, 0x0048, 0x0048, 0x0058, 0x0058, 0x0058, 0x0058, 0x0050, 0x0050, 
00291         0x0050, 0x0050, 0x0050, 0x0054, 0x0054, 0x0054, 0x0054, 0x0054, 0x0054, 0x0044, 
00292         0x0044, 0x0044, 0x0044, 0x0044, 0x0044, 0x0044, 0x0044, 0x0044, 0x0044, 0x004C, 
00293         0x004C, 0x004C, 0x004C, 0x004C, 0x0048, 0x0048, 0x0048, 0x0048, 0x0048, 0x0048, 
00294         0x0058, 0x0058, 0x0058, 0x0058, 0x0050, 0x0050, 0x0050, 0x0050, 0x0050, 0x0054, 
00295         0x0054, 0x0054, 0x0054, 0x0054, 0x0054, 0x0044, 0x0044, 0x0044, 0x0044, 0x0044, 
00296     } };
00297 
00298     set_hpattern(   &m_RoiPatternSixteen,
00299                     Mask,
00300                     BinningLimit,
00301                     RefNumElements,
00302                     SigNumElements,
00303                     BinNumElements,
00304                     RefPatternData,
00305                     SigPatternData,
00306                     BinPatternData );
00307 }
00308 
00309 
00310 void CApnCamData_CCD4720B::set_hpattern_skip_twelve()
00311 {
00312     const unsigned short Mask = 0x0;
00313     const unsigned short BinningLimit = 1;
00314     const unsigned short RefNumElements = 0;
00315     const unsigned short SigNumElements = 0;
00316 
00317     unsigned short *RefPatternData = NULL;
00318 
00319     unsigned short *SigPatternData = NULL;
00320 
00321     unsigned short BinNumElements[APN_MAX_HBINNING] = 
00322     {
00323         0x0017
00324     };
00325 
00326     unsigned short BinPatternData[1][256] = {
00327     {
00328         0x000C, 0x0008, 0x400A, 0x000A, 0x0008, 0x0008, 0x0218, 0x0018, 0x0018, 0x0018, 
00329         0x0010, 0x0010, 0x0010, 0x0010, 0x0014, 0x2014, 0x0004, 0x0004, 0x0004, 0x0004, 
00330         0x0004, 0x0005, 0x0004
00331     } };
00332 
00333     set_hpattern(   &m_SkipPatternTwelve,
00334                     Mask,
00335                     BinningLimit,
00336                     RefNumElements,
00337                     SigNumElements,
00338                     BinNumElements,
00339                     RefPatternData,
00340                     SigPatternData,
00341                     BinPatternData );
00342 }
00343 
00344 
00345 void CApnCamData_CCD4720B::set_hpattern_clamp_twelve()
00346 {
00347     const unsigned short Mask = 0x0;
00348     const unsigned short BinningLimit = 3;
00349     const unsigned short RefNumElements = 0;
00350     const unsigned short SigNumElements = 0;
00351 
00352     unsigned short *RefPatternData = NULL;
00353 
00354     unsigned short *SigPatternData = NULL;
00355 
00356     unsigned short BinNumElements[APN_MAX_HBINNING] = 
00357     {
00358         0x0017, 0x002E, 0x0044
00359     };
00360 
00361     unsigned short BinPatternData[3][256] = {
00362     {
00363         0x080C, 0x0808, 0x0A0A, 0x080A, 0x0808, 0x0808, 0x0818, 0x0818, 0x0818, 0x0818, 
00364         0x0810, 0x0810, 0x2810, 0x0810, 0x0814, 0x0814, 0x0804, 0x0804, 0x0804, 0x0804, 
00365         0x4804, 0x0805, 0x0804
00366     },
00367     {
00368         0x000C, 0x0008, 0x400A, 0x000A, 0x0008, 0x0008, 0x0218, 0x0018, 0x0018, 0x0018, 
00369         0x0010, 0x0010, 0x0010, 0x0010, 0x0014, 0x2014, 0x0004, 0x0004, 0x0004, 0x0004, 
00370         0x0004, 0x0004, 0x0004, 0x000C, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0018, 
00371         0x0018, 0x0018, 0x0018, 0x0010, 0x0010, 0x0010, 0x0010, 0x0014, 0x0014, 0x0004, 
00372         0x0004, 0x0004, 0x0004, 0x0004, 0x8005, 0x8004
00373     },
00374     {
00375         0x000C, 0x0008, 0x400A, 0x000A, 0x0008, 0x0008, 0x0218, 0x0018, 0x0018, 0x0018, 
00376         0x0010, 0x0010, 0x0010, 0x0010, 0x0014, 0x2014, 0x0004, 0x0004, 0x0004, 0x0004, 
00377         0x0004, 0x0004, 0x0004, 0x000C, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0018, 
00378         0x0018, 0x0018, 0x0018, 0x0010, 0x0010, 0x0010, 0x0010, 0x0014, 0x0014, 0x0004, 
00379         0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0008, 0x0008, 0x0008, 0x0008, 
00380         0x0008, 0x0018, 0x0018, 0x0018, 0x0018, 0x0010, 0x0010, 0x0010, 0x0010, 0x0014, 
00381         0x0014, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x8005, 0x8004
00382     } };
00383 
00384     set_hpattern(   &m_ClampPatternTwelve,
00385                     Mask,
00386                     BinningLimit,
00387                     RefNumElements,
00388                     SigNumElements,
00389                     BinNumElements,
00390                     RefPatternData,
00391                     SigPatternData,
00392                     BinPatternData );
00393 }
00394 
00395 
00396 void CApnCamData_CCD4720B::set_hpattern_roi_twelve()
00397 {
00398     const unsigned short Mask = 0x6802;
00399     const unsigned short BinningLimit = 3;
00400     const unsigned short RefNumElements = 0;
00401     const unsigned short SigNumElements = 0;
00402 
00403     unsigned short *RefPatternData = NULL;
00404 
00405     unsigned short *SigPatternData = NULL;
00406 
00407     unsigned short BinNumElements[APN_MAX_HBINNING] = 
00408     {
00409         0x0017, 0x002E, 0x0044
00410     };
00411 
00412     unsigned short BinPatternData[3][256] = {
00413     {
00414         0x000C, 0x0008, 0x020A, 0x000A, 0x0008, 0x0008, 0x0018, 0x0018, 0x0018, 0x0018, 
00415         0x0010, 0x0010, 0x2010, 0x2010, 0x0014, 0x0014, 0x0004, 0x0004, 0x0004, 0x0004, 
00416         0x0004, 0xC005, 0xC004
00417     },
00418     {
00419         0x000C, 0x0008, 0x400A, 0x000A, 0x0008, 0x0008, 0x0218, 0x0018, 0x0018, 0x0018, 
00420         0x0010, 0x0010, 0x0010, 0x0010, 0x0014, 0x2014, 0x0004, 0x0004, 0x0004, 0x0004, 
00421         0x0004, 0x0004, 0x0004, 0x000C, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0018, 
00422         0x0018, 0x0018, 0x0018, 0x0010, 0x0010, 0x0010, 0x0010, 0x0014, 0x0014, 0x0004, 
00423         0x0004, 0x0004, 0x0004, 0x0004, 0x8005, 0x8004
00424     },
00425     {
00426         0x000C, 0x0008, 0x400A, 0x000A, 0x0008, 0x0008, 0x0218, 0x0018, 0x0018, 0x0018, 
00427         0x0010, 0x0010, 0x0010, 0x0010, 0x0014, 0x2014, 0x0004, 0x0004, 0x0004, 0x0004, 
00428         0x0004, 0x0004, 0x0004, 0x000C, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0018, 
00429         0x0018, 0x0018, 0x0018, 0x0010, 0x0010, 0x0010, 0x0010, 0x0014, 0x0014, 0x0004, 
00430         0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0008, 0x0008, 0x0008, 0x0008, 
00431         0x0008, 0x0018, 0x0018, 0x0018, 0x0018, 0x0010, 0x0010, 0x0010, 0x0010, 0x0014, 
00432         0x0014, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x8005, 0x8004
00433     } };
00434 
00435     set_hpattern(   &m_RoiPatternTwelve,
00436                     Mask,
00437                     BinningLimit,
00438                     RefNumElements,
00439                     SigNumElements,
00440                     BinNumElements,
00441                     RefPatternData,
00442                     SigPatternData,
00443                     BinPatternData );
00444 }
00445 
00446 
00447 void CApnCamData_CCD4720B::set_hpattern(    APN_HPATTERN_FILE   *Pattern,
00448                                             unsigned short  Mask,
00449                                             unsigned short  BinningLimit,
00450                                             unsigned short  RefNumElements,
00451                                             unsigned short  SigNumElements,
00452                                             unsigned short  BinNumElements[],
00453                                             unsigned short  RefPatternData[],
00454                                             unsigned short  SigPatternData[],
00455                                             unsigned short  BinPatternData[][APN_MAX_PATTERN_ENTRIES] )
00456 {
00457     int i, j;
00458 
00459     Pattern->Mask = Mask;
00460     Pattern->BinningLimit = BinningLimit;
00461     Pattern->RefNumElements = RefNumElements;
00462     Pattern->SigNumElements = SigNumElements;
00463 
00464     if ( RefNumElements > 0 )
00465     {
00466         Pattern->RefPatternData = 
00467             (unsigned short *)malloc(RefNumElements * sizeof(unsigned short));
00468 
00469         for ( i=0; i<RefNumElements; i++ )
00470         {
00471             Pattern->RefPatternData[i] = RefPatternData[i];
00472         }
00473     }
00474 
00475     if ( SigNumElements > 0 )
00476     {
00477         Pattern->SigPatternData = 
00478             (unsigned short *)malloc(SigNumElements * sizeof(unsigned short));
00479 
00480         for ( i=0; i<SigNumElements; i++ )
00481         {
00482             Pattern->SigPatternData[i] = SigPatternData[i];
00483         }
00484     }
00485 
00486     if ( BinningLimit > 0 )
00487     {
00488         for ( i=0; i<BinningLimit; i++ )
00489         {
00490             Pattern->BinNumElements[i] = BinNumElements[i];
00491 
00492             Pattern->BinPatternData[i] = 
00493                 (unsigned short *)malloc(BinNumElements[i] * sizeof(unsigned short));
00494 
00495             for ( j=0; j<BinNumElements[i]; j++ )
00496             {
00497                 Pattern->BinPatternData[i][j] = BinPatternData[i][j];
00498             }
00499         }
00500     }
00501 }

kstars

Skip menu "kstars"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members
  • Related Pages

kdeedu

Skip menu "kdeedu"
  • kalzium
  • kanagram
  • kig
  • klettres
  • kstars
  • libkdeedu
  •   keduvocdocument
  •   docs
  •   src
  • parley
Generated for kdeedu by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal