#ifndef _CCD_H #define _CCD_H #ifdef __cplusplus extern "C" { #endif #ifdef CCD_EXPORT #define CCD_API __declspec(dllexport) #else #define CCD_API __declspec(dllimport) #endif typedef struct CCDInformation{ long camera; int status; int HBin; int VBin; int ScanNum; //frame number int Gain; int PGain; int Trigger; int AcqMode; int ReadMode; int ShutterMode; int ScanMode; //scan mode - 0:spectrograph, 1:imaging mode, -1:None int FanSpeed; int nx; //nwidth, nhdim int ny; //nheight, nydim int CCD_XPix; int CCD_YPix; int Temperature; int wvIndex; int TelXpos; int TelYpos; int gStep; //grating step count float gWv; //grating wavelength float gAngle; //grating angle float exptime; float elapseTime; float stepTime; //scan_duration float stepSize; //real_scan_size ���� ���⿡�� �� ���� ���� �����. float scanSpeed; //scan_speed float scanDist; //scan_stroke char FilePath[256]; char CCDPath[256]; char camID[2]; char ccdName[32]; char stTime[64]; char edTime[64]; char Target[64]; char Observer[32]; unsigned short* RawData; unsigned short* BiasDark; float* FlatCube; }CCDInfo; CCD_API int OpenCamera(CCDInfo* CCD, AndorCapabilities* caps); CCD_API int CloseCamera(CCDInfo* CCD); CCD_API int GetCameraInfo(char* array, AndorCapabilities* caps); CCD_API int SetCameraParam(CCDInfo* CCD, char* statOut); CCD_API int TakeImage(void); CCD_API char* SaveFits(CCDInfo CCD); CCD_API int DataDump(CCDInfo* CCD, int i); CCD_API int TakeBiasDark(CCDInfo* CCD); CCD_API int TakeImage_FTmode(CCDInfo* CCD); CCD_API char* marktime(char* timestring, LARGE_INTEGER* gTime); CCD_API float time_difference(LARGE_INTEGER gStart, LARGE_INTEGER gEnd); CCD_API int SaveFlatFits(CCDInfo CCD, int number); CCD_API int SaveBiasDark(CCDInfo CCD, double* diff_time); CCD_API int TempSet(CCDInfo CCD, int OnOff, int Temp); CCD_API void StructTestCCD(CCDInfo* CCD); // void BiasDarkCorrection(CCDInfo CCD, int framenumber); //Define error value #define ERR_initialize -1 //Initialize Error in OpenCamera function #define ERR_getDetectorInfo -2 //Get detecter information error in OpenCamera function or in GetCameraInfo function #define ERR_getCapabilities -3 //Get Andor Capabilities information Error in GetCameraInfo function #define ERR_getHeadModel -4 //Get HeadModel information Error in GetCameraInfo #define ERR_getNumADChannels -5 //Get number AD channel Error in GetCameraInfo function #define ERR_getStatus -6 //Status, System not initialized in CloseCamera function #define ERR_setShutter -7 //Shutter close Error in CloseCamera function or SetCameraParam #define ERR_setFan -8 //Fan close Error in CloseCamera function or SetCameraParam #define ERR_shutDown -9 //Shut down Error in CloseCamera function #define ERR_memAloc -10 // Memory Alocation Error in SetCameraParam #define ERR_setAcqMode -11 // set acqusition mode error in SetCameraParam #define ERR_setFrameNum -12 // set frame number error in SetCameraParam #define ERR_setReadMode -13 // set read mode error in SetCameraParam #define ERR_setPreAmpGain -14 // set pre amp gain error in SetCameraParam #define ERR_setGain -15 // set gain error in SetCameraParam #define ERR_setTriggerMode -16 // set trigger mode error in SetCameraParam #define ERR_setExpTime -17 // set exporsure time error in SetCameraParam #define ERR_startAcq -18 // Start Acquisition error in TakeImage #define ERR_setGliFreq -99 // error to set QueryPerformanceFrequency in OpenCamera #ifdef __cplusplus } #endif #endif