#ifndef MASK_H #define MASK_H /******************************************************************************* * E.S.O. - VLT project * * "@(#) $Id: AP_mask.h,v 2.43 2004/06/17 23:04:26 vltsccm Exp $" * * who when what * -------- -------- ---------------------------------------------- * hummel 13/03/98 created */ /************************************************************************ * *---------------------------------------------------------------------- */ #ifndef __cplusplus #error This is a C++ include file and cannot be used from plain C #endif #include "AP_pixel.h" //---------------- class AP_mask : public AP_pixel { //---------------- private: float wx[5],wy[5]; // current window position 4 points 1..4 // wx/y[0]=center float xma,yma,xmi,ymi,dist_pix_y,width_pix; float pa; // position angle, the current rot_ang float ax[21],ay[21],bx[21],by[21]; // 19 slitlets int i_big,i_sma; // index for X-orientation public: static float dist; // distance between two MOS slitlets in arcsec static float width; // half width of a MOS slitlet in arcsec void reset_mask(float px, float py, float PA); // creates a mask at px,py with rot, // rot is anti-clock void rot_mask(float rot_ang); // rotate the possibly already rotated mask once more be an amount of // rot_ang degrees at the current position void shift_mask(float dx, float dy); // shift the mask by (dx dy) void p2m(float *x, float *y); // coordinate transformation // CCD frame pixel to mask // input and output units are CCD pixel void m2p(float *x, float *y); // coordinate transformation // mask coords to CCD frame coords // input and output units are CCD pixel void shift_mask_to(float px, float py); int p_in_window(float px, float py); // wrapper for p_in_area float pr_on_slitlet(float px, float py, int slit); // wrapper for pr_on_line void print_mask(); // no comment void test(); // the functions above // the constructors AP_mask(float scale,float focscale,float ra_min, float ra_max,float dec_min,float dec_max); AP_mask(float scale,float focscale,float ra_min, float ra_max,float dec_min); AP_mask(float scale,float focscale,float ra_min, float ra_max,float dec_min,int x_flag); AP_mask(); }; #endif /*!_H*/