00001 #ifndef __QUALLEV0_H 00002 #define __QUALLEV0_H 00003 //These are the meaning of the bits put into the QUALLEV0 keyword for a drms 00004 //record from the ingest_lev0 processing. 00005 00006 //Bit0 is the low bit (0x01) 00007 //The first 4 bits are determined from the Img sturct passed back by 00008 //imgdecode() 00009 #define Q_OVFL 0x01 //overflow flag set 00010 #define Q_HDRERR 0x02 //header error flag set 00011 #define Q_CMPERR 0x04 //compression error in image 00012 #define Q_LPXERR 0x08 //last pixel error 00013 00014 //image status packet is missing if FSN != HSQFGSN 00015 #define Q_NOISP 0x10 //no ISP 00016 #define Q_MISSI 0x20 //missing image 00017 #define Q_CORRUPT 0x40 //corrupt image (FSN=469769216 0x1c001c00) 00018 #define Q_INVALTIME 0x80//HOBITSEC = 0 (T_OBS = 1958.01.01_00:00:00_UTC) 00019 00020 //missvals is from Img struct totalvals-datavals 00021 #define Q_MISS0 0x100 //missvals > 0 00022 #define Q_MISS1 0x200 //missvals > 0.01*totalvals 00023 #define Q_MISS2 0x400 //missvals > 0.05*totalvals 00024 #define Q_MISS3 0x800 //missvals > 0.25*totalvals 00025 00026 // Instrument misconfiguration, e.g. worng Aperture Selector target. 00027 #define Q_MISCONFIG 0x1000 // likely set manually 00028 00029 #define Q_CAM_ANOM 0x8000 //Camera Anomaly - Entered by hand - Hao QUALITY=0x00008000 00030 00031 //HMI sepecific 00032 #define Q_DARK 0x10000 //dark image (bit 16) 00033 //#define Q_SEQERR 0x10000 //sequencer error HSEQERR != 'SUCCESS' 00034 #define Q_ISSOPEN 0x20000 //ISS loop open HWLTNSET = 'OPEN' 00035 #define Q_HCF1ENCD 0x40000 //Focus/Cal Motor 1 Error 00036 //HCF1ENCD ne HCF1POS +/- 1 00037 #define Q_HCF2ENCD 0x80000 //Focus/Cal Motor 2 Error 00038 //HCF2ENCD ne HCF2POS +/- 1 00039 #define Q_HPS1ENCD 0x100000 //Polarization MTR 1 Error 00040 //HPS1ENCD ne HPL1POS +/- 1 %240 00041 #define Q_HPS2ENCD 0x200000 //Polarization MTR 2 Error 00042 //HPS2ENCD ne HPL2POS +/- 1 %240 00043 #define Q_HPS3ENCD 0x400000 //Polarization MTR 3 Error 00044 //HPS3ENCD ne HPL3POS +/- 1 %240 00045 #define Q_HWT1ENCD 0x800000 //Wavelength Motor 1 Error 00046 //HWT1ENCD ne HWL1POS +/- 1 %240 00047 #define Q_HWT2ENCD 0x1000000 //Wavelength Motor 2 Error 00048 //HWT2ENCD ne HWL2POS +/- 1 %240 00049 #define Q_HWT3ENCD 0x2000000 //Wavelength Motor 3 Error 00050 //HWT3ENCD ne HWL3POS +/- 1 %240 00051 #define Q_HWT4ENCD 0x4000000 //Wavelength Motor 4 Error 00052 //HWT4ENCD ne HWL4POS +/- 1 %240 00053 00054 #define Q_GPREGBIT0 0x10000000 00055 #define Q_GPREGBIT1 0x20000000 00056 #define Q_REOPENED 0x40000000 // image reopened during reconstruction; NPACKETS value may be incorrect 00057 #define Q_MISSALL 0x80000000 //data is completely missing. high bit 00058 00059 //Fits keyword and Image Status Packet (ISP) keyword translation: 00060 //HWLTNSET = HMI_IMG_ISS_LOOP 00061 //HSEQERR = HMI_SEQ_ERROR 00062 // 00063 //HCF1ENCD = HMI_CF1_ENCODER 00064 //HCF2ENCD = HMI_CF1_ENCODER 00065 //HPS1ENCD = HMI_PL1_ENCODER 00066 //HPS2ENCD = HMI_PL2_ENCODER 00067 //HPS3ENCD = HMI_PL3_ENCODER 00068 //HWT1ENCD = HMI_WT1_ENCODER 00069 //HWT2ENCD = HM2_WT1_ENCODER 00070 //HWT3ENCD = HM3_WT1_ENCODER 00071 //HWT4ENCD = HM4_WT1_ENCODER 00072 // 00073 //HCF1POS = HMI_FSW_CF1_CMDED_TARGET 00074 //HCF2POS = HMI_FSW_CF2_CMDED_TARGET 00075 //HPL1POS = HMI_FSW_PL1_CMDED_TARGET 00076 //HPL2POS = HMI_FSW_PL2_CMDED_TARGET 00077 //HPL3POS = HMI_FSW_PL3_CMDED_TARGET 00078 //HWL1POS = HMI_FSW_WT1_CMDED_TARGET 00079 //HWL2POS = HMI_FSW_WT2_CMDED_TARGET 00080 //HWL3POS = HMI_FSW_WT3_CMDED_TARGET 00081 //HWL4POS = HMI_FSW_WT4_CMDED_TARGET 00082 00083 //AIA sepecific 00084 #define AQ_ISSOPEN 0x20000 //ISS loop open AISTATE = 'OPEN' 00085 #define A94Mech_Err 0x40000 //AIAWVLEN == 94 && 00086 //{(AIFILTYP == 0 && AIFWEN != 269 && AIFWEN != 270) 00087 //|| (AIFILTYP == 1 && AIFWEN != 11 && AIFWEN != 12) 00088 //|| (AIFILTYP == 2 && AIFWEN != 74 && AIFWEN != 75) 00089 #define A131Mech_Err 0x80000 //AIAWVLEN == 131 && 00090 //{(AIFILTYP == 0 && AIFWEN != 269 && AIFWEN != 270) 00091 //|| (AIFILTYP == 1 && AIFWEN != 11 && AIFWEN != 12) 00092 //|| (AIFILTYP == 2 && AIFWEN != 74 && AIFWEN != 75) 00093 #define A171Mech_Err 0x100000 //AIAWVLEN == 171 && 00094 //{(AIFILTYP == 0 && AIFWEN != 203 && AIFWEN != 204) 00095 //|| (AIFILTYP == 1 && AIFWEN != 11 && AIFWEN != 12) 00096 #define A193Mech_Err 0x200000 //AIAWVLEN == 193 && {AIASEN != 6 00097 //|| (AIFILTYP == 0 && AIFWEN != 269 && AIFWEN != 270) 00098 //|| (AIFILTYP == 1 && AIFWEN != 11 && AIFWEN != 12) 00099 //|| (AIFILTYP == 2 && AIFWEN != 74 && AIFWEN != 75) 00100 #define A211Mech_Err 0x400000 //AIAWVLEN == 211 && {AIASEN != 24 00101 //|| (AIFILTYP == 0 && AIFWEN != 203 && AIFWEN != 204) 00102 //|| (AIFILTYP == 1 && AIFWEN != 137 && AIFWEN != 138) 00103 //|| (AIFILTYP == 2 && AIFWEN != 74 && AIFWEN != 75) 00104 #define A304Mech_Err 0x800000 //AIAWVLEN == 304 && 00105 // {(AIFILTYP == 0 && AIFWEN != 203 && AIFWEN != 204) 00106 //|| (AIFILTYP == 1 && AIFWEN != 137 && AIFWEN != 138) 00107 //|| (AIFILTYP == 2 && AIFWEN != 74 && AIFWEN != 75) 00108 #define A335Mech_Err 0x1000000 //AIAWVLEN == 335 && 00109 // {(AIFILTYP == 0 && AIFWEN != 203 && AIFWEN != 204) 00110 //|| (AIFILTYP == 1 && AIFWEN != 137 && AIFWEN != 138) 00111 //|| (AIFILTYP == 2 && AIFWEN != 74 && AIFWEN != 75) 00112 #define A160Mech_Err 0x2000000 //AIAWVLEN == 1600 && AIFWEN != 269 && 00113 // AIFWEN != 270 00114 #define A170Mech_Err 0x4000000 //AIAWVLEN == 1700 && AIFWEN != 137 && 00115 // AIFWEN != 138 00116 #define A450Mech_Err 0x8000000 //AIAWVLEN == 4500 && AIFWEN != 74 && 00117 // AIFWEN != 75 00118 00119 #define AQ_INVAL_WL 0x10000000 //invalid wavelength WAVE_STR == "UNKNOWN" 00120 00121 //AIA Mechanism position definitions from Paul Boerner 00122 //WAVELEN FILTER_TYPE FW_ENCODER AS_ENCODER" 00123 //1600 "Don't check" "269 or 270" "Don't check" 00124 // "Don't check" "269 or 270" "Don't check" 00125 // "Don't check" "269 or 270" "Don't check" 00126 // 00127 //1700 "Don't check" "137 or 138" "Don't check" 00128 // "Don't check" "137 or 138" "Don't check" 00129 // "Don't check" "137 or 138" "Don't check" 00130 // 00131 //4500 "Don't check" "74 or 75" "Don't check" 00132 // "Don't check" "74 or 75" "Don't check" 00133 // "Don't check" "74 or 75" "Don't check" 00134 // 00135 //WAVELEN FILTER_TYPE FW_ENCODER AS_ENCODER" 00136 //94 0 "269 or 270" "Don't check" 00137 // 1 "11 or 12" "Don't check" 00138 // 2 "74 or 75" "Don't check" 00139 // 00140 //133 0 "269 or 270" "Don't check" 00141 // 1 "11 or 12" "Don't check" 00142 // 2 "74 or 75" "Don't check" 00143 // 00144 //171 0 "203 or 204" "Don't check" 00145 // 1 "11 or 12" "Don't check" 00146 // 2 "Don't Check" "Don't check" 00147 // 00148 //304 0 "203 or 204" "Don't check" 00149 // 1 "137 or 138" "Don't check" 00150 // 2 "74 or 75" "Don't check" 00151 // 00152 //335 0 "203 or 204" "Don't check" 00153 // 1 "137 or 138" "Don't check" 00154 // 2 "74 or 75" "Don't check" 00155 // 00156 //WAVELEN FILTER_TYPE FW_ENCODER AS_ENCODER" 00157 //193 0 "269 or 270" 6 00158 // 1 "11 or 12" 6 00159 // 2 "74 or 75" 6 00160 // 00161 //211 0 "203 or 204" 24 00162 // 1 "137 or 138" 24 00163 // 2 "74 or 75" 24 00164 // 00165 // *************************************************************** 00166 // 00167 //Fits keyword and Image Status Packet (ISP) keyword translation: 00168 // 00169 //ASQFSN AIA_SEQ_FRAME_SN longlong 00170 //AISTATE AIA_IMG_ISS_LOOP string 00171 //AIAWVLEN AIA_IMG_WAVELENGTH int 00172 //AIASEN AIA_IMG_AS_ENCODER int 00173 //AIFILTYP AIA_IMG_FILTER_TYPE short 00174 //AIFWEN AIA_IMG_FW_ENCODE int 00175 //AIFOENFL AIA_IMG_FOCUS_ENA_FLAG short 00176 // 00177 #endif 00178