Instrument Neutral Distributed Interface INDI
2.0.2
|
The CCDChip class provides functionality of a CCD Chip within a CCD. More...
#include <indiccdchip.h>
Public Types | |
enum | CCD_FRAME { LIGHT_FRAME = 0 , BIAS_FRAME , DARK_FRAME , FLAT_FRAME } |
enum | CCD_FRAME_INDEX { FRAME_X , FRAME_Y , FRAME_W , FRAME_H } |
enum | CCD_BIN_INDEX { BIN_W , BIN_H } |
enum | CCD_INFO_INDEX { CCD_MAX_X , CCD_MAX_Y , CCD_PIXEL_SIZE , CCD_PIXEL_SIZE_X , CCD_PIXEL_SIZE_Y , CCD_BITSPERPIXEL } |
Public Member Functions | |
CCDChip () | |
~CCDChip () | |
bool | openFITSFile (uint32_t size, int &status) |
openFITSFile Allocate memory buffer for internal FITS file structure and open More... | |
bool | finishFITSFile (int &status) |
Finish any pending write to fits file. More... | |
void | closeFITSFile () |
closeFITSFile Close the in-memory FITS File. More... | |
int | getXRes () const |
getXRes Get the horizontal resolution in pixels of the CCD Chip. More... | |
int | getYRes () const |
Get the vertical resolution in pixels of the CCD Chip. More... | |
int | getSubX () const |
getSubX Get the starting left coordinates (X) of the frame. More... | |
int | getSubY () const |
getSubY Get the starting top coordinates (Y) of the frame. More... | |
int | getSubW () const |
getSubW Get the width of the frame More... | |
int | getSubH () const |
getSubH Get the height of the frame More... | |
int | getBinX () const |
getBinX Get horizontal binning of the CCD chip. More... | |
int | getBinY () const |
getBinY Get vertical binning of the CCD chip. More... | |
float | getPixelSizeX () const |
getPixelSizeX Get horizontal pixel size in microns. More... | |
float | getPixelSizeY () const |
getPixelSizeY Get vertical pixel size in microns. More... | |
int | getBPP () const |
getBPP Get CCD Chip depth (bits per pixel). More... | |
int | getFrameBufferSize () const |
getFrameBufferSize Get allocated frame buffer size to hold the CCD image frame. More... | |
double | getExposureLeft () const |
getExposureLeft Get exposure time left in seconds. More... | |
double | getExposureDuration () const |
getExposureDuration Get requested exposure duration for the CCD chip in seconds. More... | |
const char * | getExposureStartTime () |
getExposureStartTime More... | |
uint8_t * | getFrameBuffer () |
getFrameBuffer Get raw frame buffer of the CCD chip. More... | |
void | setFrameBuffer (uint8_t *buffer) |
setFrameBuffer Set raw frame buffer pointer. More... | |
bool | isCompressed () const |
isCompressed More... | |
CCD_FRAME | getFrameType () const |
isInterlaced More... | |
const char * | getFrameTypeName (CCD_FRAME fType) |
getFrameTypeName returns CCD Frame type name More... | |
INumberVectorProperty * | getCCDInfo () |
Return CCD Info Property. More... | |
void | setResolution (uint32_t x, uint32_t y) |
setResolution set CCD Chip resolution More... | |
void | setFrame (uint32_t subx, uint32_t suby, uint32_t subw, uint32_t subh) |
setFrame Set desired frame resolutoin for an exposure. More... | |
void | setBin (uint8_t hor, uint8_t ver) |
setBin Set CCD Chip binnig More... | |
void | setMinMaxStep (const char *property, const char *element, double min, double max, double step, bool sendToClient=true) |
setMinMaxStep for a number property element More... | |
void | setPixelSize (double x, double y) |
setPixelSize Set CCD Chip pixel size More... | |
void | setCompressed (bool cmp) |
setCompressed Set whether a frame is compressed after exposure? More... | |
void | setFrameBufferSize (uint32_t nbuf, bool allocMem=true) |
setFrameBufferSize Set desired frame buffer size. The function will allocate memory accordingly. The frame size depends on the desired frame resolution (Left, Top, Width, Height), depth of the CCD chip (bpp), and binning settings. You must set the frame size any time any of the prior parameters gets updated. More... | |
void | setBPP (uint8_t bpp) |
setBPP Set depth of CCD chip. More... | |
void | setFrameType (CCD_FRAME type) |
setFrameType Set desired frame type for next exposure. More... | |
void | setExposureDuration (double duration) |
setExposureDuration Set desired CCD frame exposure duration for next exposure. You must call this function immediately before starting the actual exposure as it is used to calculate the timestamp used for the FITS header. More... | |
void | setExposureLeft (double duration) |
setExposureLeft Update exposure time left. Inform the client of the new exposure time left value. More... | |
void | setExposureComplete () |
setExposureComplete Mark exposure as complete by setting ImageExposure property to IPS_OK More... | |
void | setExposureFailed () |
setExposureFailed Alert the client that the exposure failed. More... | |
int | getNAxis () const |
void | setNAxis (int value) |
setNAxis Set FITS number of axis More... | |
void | setImageExtension (const char *ext) |
setImageExtension Set image exntension More... | |
char * | getImageExtension () |
bool | isExposing () const |
void | binFrame () |
binFrame Perform software binning on the CCD frame. Only use this function if hardware binning is not supported. More... | |
void | binBayerFrame () |
binBayerFrame Perform software binning on a 2x2 Bayer matrix CCD frame. Only use this function if hardware binning is not supported. More... | |
fitsfile ** | fitsFilePointer () |
size_t * | fitsMemorySizePointer () |
void ** | fitsMemoryBlockPointer () |
Friends | |
class | CCD |
class | StreamRecoder |
The CCDChip class provides functionality of a CCD Chip within a CCD.
Definition at line 34 of file indiccdchip.h.
Enumerator | |
---|---|
BIN_W | |
BIN_H |
Definition at line 42 of file indiccdchip.h.
Enumerator | |
---|---|
LIGHT_FRAME | |
BIAS_FRAME | |
DARK_FRAME | |
FLAT_FRAME |
Definition at line 40 of file indiccdchip.h.
Enumerator | |
---|---|
FRAME_X | |
FRAME_Y | |
FRAME_W | |
FRAME_H |
Definition at line 41 of file indiccdchip.h.
Enumerator | |
---|---|
CCD_MAX_X | |
CCD_MAX_Y | |
CCD_PIXEL_SIZE | |
CCD_PIXEL_SIZE_X | |
CCD_PIXEL_SIZE_Y | |
CCD_BITSPERPIXEL |
Definition at line 43 of file indiccdchip.h.
INDI::CCDChip::CCDChip | ( | ) |
Definition at line 28 of file indiccdchip.cpp.
INDI::CCDChip::~CCDChip | ( | ) |
Definition at line 33 of file indiccdchip.cpp.
void INDI::CCDChip::binBayerFrame | ( | ) |
binBayerFrame Perform software binning on a 2x2 Bayer matrix CCD frame. Only use this function if hardware binning is not supported.
Definition at line 377 of file indiccdchip.cpp.
void INDI::CCDChip::binFrame | ( | ) |
binFrame Perform software binning on the CCD frame. Only use this function if hardware binning is not supported.
Definition at line 284 of file indiccdchip.cpp.
void INDI::CCDChip::closeFITSFile | ( | ) |
closeFITSFile Close the in-memory FITS File.
Definition at line 72 of file indiccdchip.cpp.
bool INDI::CCDChip::finishFITSFile | ( | int & | status | ) |
Finish any pending write to fits file.
Definition at line 61 of file indiccdchip.cpp.
|
inline |
Definition at line 416 of file indiccdchip.h.
|
inline |
Definition at line 426 of file indiccdchip.h.
|
inline |
Definition at line 421 of file indiccdchip.h.
|
inline |
getBinX Get horizontal binning of the CCD chip.
Definition at line 131 of file indiccdchip.h.
|
inline |
getBinY Get vertical binning of the CCD chip.
Definition at line 140 of file indiccdchip.h.
|
inline |
getBPP Get CCD Chip depth (bits per pixel).
Definition at line 167 of file indiccdchip.h.
|
inline |
Definition at line 264 of file indiccdchip.h.
|
inline |
getExposureDuration Get requested exposure duration for the CCD chip in seconds.
Definition at line 194 of file indiccdchip.h.
|
inline |
getExposureLeft Get exposure time left in seconds.
Definition at line 185 of file indiccdchip.h.
const char * INDI::CCDChip::getExposureStartTime | ( | ) |
getExposureStartTime
Definition at line 236 of file indiccdchip.cpp.
|
inline |
getFrameBuffer Get raw frame buffer of the CCD chip.
Definition at line 209 of file indiccdchip.h.
|
inline |
getFrameBufferSize Get allocated frame buffer size to hold the CCD image frame.
Definition at line 176 of file indiccdchip.h.
|
inline |
isInterlaced
getFrameType
Definition at line 249 of file indiccdchip.h.
const char * INDI::CCDChip::getFrameTypeName | ( | CCD_FRAME | fType | ) |
getFrameTypeName returns CCD Frame type name
fType | type of frame |
Definition at line 231 of file indiccdchip.cpp.
|
inline |
Definition at line 391 of file indiccdchip.h.
int INDI::CCDChip::getNAxis | ( | ) | const |
Definition at line 269 of file indiccdchip.cpp.
|
inline |
getPixelSizeX Get horizontal pixel size in microns.
Definition at line 149 of file indiccdchip.h.
|
inline |
getPixelSizeY Get vertical pixel size in microns.
Definition at line 158 of file indiccdchip.h.
|
inline |
getSubH Get the height of the frame
Definition at line 122 of file indiccdchip.h.
|
inline |
getSubW Get the width of the frame
Definition at line 113 of file indiccdchip.h.
|
inline |
getSubX Get the starting left coordinates (X) of the frame.
Definition at line 95 of file indiccdchip.h.
|
inline |
getSubY Get the starting top coordinates (Y) of the frame.
Definition at line 104 of file indiccdchip.h.
|
inline |
getXRes Get the horizontal resolution in pixels of the CCD Chip.
Definition at line 77 of file indiccdchip.h.
|
inline |
Get the vertical resolution in pixels of the CCD Chip.
Definition at line 86 of file indiccdchip.h.
|
inline |
isCompressed
Definition at line 231 of file indiccdchip.h.
|
inline |
Definition at line 399 of file indiccdchip.h.
bool INDI::CCDChip::openFITSFile | ( | uint32_t | size, |
int & | status | ||
) |
openFITSFile Allocate memory buffer for internal FITS file structure and open
FITS | error code in case an error happens. an in-memory FITS file as a Shared BLOB. |
Definition at line 40 of file indiccdchip.cpp.
void INDI::CCDChip::setBin | ( | uint8_t | hor, |
uint8_t | ver | ||
) |
setBin Set CCD Chip binnig
hor | Horizontal binning. |
ver | Vertical binning. |
Definition at line 127 of file indiccdchip.cpp.
void INDI::CCDChip::setBPP | ( | uint8_t | bpp | ) |
setBPP Set depth of CCD chip.
bpp | bits per pixel |
Definition at line 180 of file indiccdchip.cpp.
void INDI::CCDChip::setCompressed | ( | bool | cmp | ) |
setCompressed Set whether a frame is compressed after exposure?
cmp | If true, compress frame. |
void INDI::CCDChip::setExposureComplete | ( | ) |
setExposureComplete Mark exposure as complete by setting ImageExposure property to IPS_OK
Definition at line 218 of file indiccdchip.cpp.
void INDI::CCDChip::setExposureDuration | ( | double | duration | ) |
setExposureDuration Set desired CCD frame exposure duration for next exposure. You must call this function immediately before starting the actual exposure as it is used to calculate the timestamp used for the FITS header.
duration | exposure duration in seconds. |
Definition at line 225 of file indiccdchip.cpp.
void INDI::CCDChip::setExposureFailed | ( | ) |
setExposureFailed Alert the client that the exposure failed.
Definition at line 263 of file indiccdchip.cpp.
void INDI::CCDChip::setExposureLeft | ( | double | duration | ) |
setExposureLeft Update exposure time left. Inform the client of the new exposure time left value.
duration | exposure duration left in seconds. |
Definition at line 211 of file indiccdchip.cpp.
void INDI::CCDChip::setFrame | ( | uint32_t | subx, |
uint32_t | suby, | ||
uint32_t | subw, | ||
uint32_t | subh | ||
) |
setFrame Set desired frame resolutoin for an exposure.
subx | Left position. |
suby | Top position. |
subw | unbinned width of the frame. |
subh | unbinned height of the frame. |
Definition at line 112 of file indiccdchip.cpp.
|
inline |
setFrameBuffer Set raw frame buffer pointer.
buffer | pointer to frame buffer /note CCD Chip allocates the frame buffer internally once SetFrameBufferSize is called with allocMem set to true which is the default behavior. If you allocated the memory yourself (i.e. allocMem is false), then you must call this function to set the pointer to the raw frame buffer. |
Definition at line 222 of file indiccdchip.h.
void INDI::CCDChip::setFrameBufferSize | ( | uint32_t | nbuf, |
bool | allocMem = true |
||
) |
setFrameBufferSize Set desired frame buffer size. The function will allocate memory accordingly. The frame size depends on the desired frame resolution (Left, Top, Width, Height), depth of the CCD chip (bpp), and binning settings. You must set the frame size any time any of the prior parameters gets updated.
nbuf | size of buffer in bytes. |
allocMem | if True, it will allocate memory of nbut size bytes. |
Definition at line 189 of file indiccdchip.cpp.
void INDI::CCDChip::setFrameType | ( | CCD_FRAME | type | ) |
setFrameType Set desired frame type for next exposure.
type | desired CCD frame type. |
Definition at line 85 of file indiccdchip.cpp.
void INDI::CCDChip::setImageExtension | ( | const char * | ext | ) |
setImageExtension Set image exntension
ext | extension (fits, jpeg, raw..etc) |
Definition at line 279 of file indiccdchip.cpp.
void INDI::CCDChip::setMinMaxStep | ( | const char * | property, |
const char * | element, | ||
double | min, | ||
double | max, | ||
double | step, | ||
bool | sendToClient = true |
||
) |
setMinMaxStep for a number property element
property | Property name |
element | Element name |
min | Minimum element value |
max | Maximum element value |
step | Element step value |
sendToClient | If true (default), the element limits are updated and is sent to the client. If false, the element limits are updated without getting sent to the client. |
Definition at line 138 of file indiccdchip.cpp.
void INDI::CCDChip::setNAxis | ( | int | value | ) |
setNAxis Set FITS number of axis
value | number of axis |
Definition at line 274 of file indiccdchip.cpp.
void INDI::CCDChip::setPixelSize | ( | double | x, |
double | y | ||
) |
setPixelSize Set CCD Chip pixel size
x | Horziontal pixel size in microns. |
y | Vertical pixel size in microns. |
Definition at line 168 of file indiccdchip.cpp.
void INDI::CCDChip::setResolution | ( | uint32_t | x, |
uint32_t | y | ||
) |
setResolution set CCD Chip resolution
x | width |
y | height |
Definition at line 90 of file indiccdchip.cpp.
|
friend |
Definition at line 539 of file indiccdchip.h.
|
friend |
Definition at line 540 of file indiccdchip.h.