- Timestamp:
- 08/25/08 17:29:28 (16 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r9130 r9131 18 18 19 19 -*-*- END OF LINE -*-*- 20 21 2008/08/25 Daniela Dorner 22 23 * datacenter/macros/filloptical.C: 24 - added different return values in case of not matching lines 25 - added new columns (ellipticity and position angle) 26 27 * datacenter/macros/fillobjects.C, datacenter/macros/fillobjects2.C: 28 - InsertUpdate instead of Insert now 29 30 * datacenter/macros/fillobjects.C: 31 - 32 33 * resources/TeVsources.txt, resources/good_compstars_R.txt: 34 - added new sources 35 36 * datacenter/scripts/copyscript: 37 - implemented new return values 38 - improved find for optical files 39 40 * datacenter/scripts/dbchk: 41 - adapted check for consistency between sequencefiles and content 42 of database: now only done for sequences where the file is 43 already written 44 45 20 46 21 47 2008/08/22 Daniela Dorner -
trunk/MagicSoft/Mars/datacenter/macros/filloptical.C
r8996 r9131 38 38 // Returns 2 in case of invalid file or line in file. 39 39 // Returns 3 in case of a missing object name in the database. 40 // Returns 4 in case of a telescope line with more or less than 2 arguments 41 // Returns 5 in case of a timestamp line with more or less than 4 arguments 42 // Returns 6 in case of a object line with more or less than 10 arguments 40 43 // 41 44 /////////////////////////////////////////////////////////////////////////// … … 84 87 TString skylevel; 85 88 TString fwhm; 89 TString ellipticity; 90 TString posangle; 86 91 TString aperturer; 87 92 TString mag; … … 130 135 if (arr->GetEntries()!=2) 131 136 { 132 cout << "WARNING: Telescopeline with less or more than 2 arguments found " << endl; 133 return 2; 137 cout << "WARNING: Telescopeline with less or more than 2 arguments found in file " << 138 fname(TRegexp("20[0-9][0-9]_[0-1][0-9]_[0-3][0-9]_.*_[RV][_]?[12]?[.]instr", kFALSE)) << endl; 139 cout << "Line: " << line << endl; 140 return 4; 134 141 } 135 142 telescope=(*arr)[0]->GetName(); … … 146 153 if (arr->GetEntries()!=4) 147 154 { 148 cout << "WARNING: Timestampline with less or more than 4 arguments found " << endl; 149 return 2; 155 cout << "WARNING: Timestampline with less or more than 4 arguments found in file " << 156 fname(TRegexp("20[0-9][0-9]_[0-1][0-9]_[0-3][0-9]_.*_[RV][_]?[12]?[.]instr", kFALSE)) << endl; 157 cout << "Line: " << line << endl; 158 return 5; 150 159 } 151 160 numexp+=1; … … 162 171 else 163 172 { 164 if (arr->GetEntries()!= 8)173 if (arr->GetEntries()!=10) 165 174 { 166 cout << "WARNING: Objectline with less or more than 8 arguments found " << endl; 167 cout << line << endl; 168 return 2; 175 cout << "WARNING: Objectline with less or more than 10 arguments found in file " << 176 fname(TRegexp("20[0-9][0-9]_[0-1][0-9]_[0-3][0-9]_.*_[RV][_]?[12]?[.]instr", kFALSE)) << endl; 177 cout << "Line: " << line << endl; 178 return 6; 169 179 } 170 180 … … 197 207 } 198 208 199 object = Form("%s/%s", (*arr)[0]->GetName(),(*arr)[1]->GetName()); 200 skylevel = (*arr)[2]->GetName(); 201 fwhm = (*arr)[3]->GetName(); 202 aperturer = (*arr)[4]->GetName(); 203 mag = (*arr)[5]->GetName(); 204 magerr = (*arr)[6]->GetName(); 205 status = (*arr)[7]->GetName(); 209 object = Form("%s/%s", (*arr)[0]->GetName(),(*arr)[1]->GetName()); 210 skylevel = (*arr)[2]->GetName(); 211 fwhm = (*arr)[3]->GetName(); 212 ellipticity = (*arr)[4]->GetName(); 213 posangle = (*arr)[5]->GetName(); 214 aperturer = (*arr)[6]->GetName(); 215 mag = (*arr)[7]->GetName(); 216 magerr = (*arr)[8]->GetName(); 217 status = (*arr)[9]->GetName(); 206 218 //make sure that no nonsense values enter the db 207 219 if (skylevel.Contains("-")) 208 220 skylevel = "NULL"; 221 if (ellipticity.Contains("-")) 222 ellipticity = "NULL"; 209 223 if (fwhm.Contains("-") || !fwhm.IsFloat()) 210 224 fwhm = "NULL"; 225 if (posangle.EndsWith("-")) 226 posangle = "NULL"; 211 227 if (!mag.IsFloat()) 212 228 mag = "NULL"; … … 221 237 /* 222 238 cout << numexp << "th exposure: star # " << numstars << endl; 223 cout << " timestamp: " << timestamp << endl; 224 cout << " exposure : " << exposure << endl; 225 cout << " fitsfile : " << fitsfile << endl; 226 cout << " object : " << object << endl; 227 cout << " skylevel : " << skylevel << endl; 228 cout << " fwhm : " << fwhm << endl; 229 cout << " aperturer: " << aperturer << endl; 230 cout << " mag : " << mag << " +/- " << magerr << endl; 231 cout << " status : " << status << endl << endl; 239 cout << " timestamp : " << timestamp << endl; 240 cout << " exposure : " << exposure << endl; 241 cout << " fitsfile : " << fitsfile << endl; 242 cout << " object : " << object << endl; 243 cout << " skylevel : " << skylevel << endl; 244 cout << " fwhm : " << fwhm << endl; 245 cout << " ellipticity: " << ellipticity << endl; 246 cout << " posangle : " << posangle << endl; 247 cout << " aperturer : " << aperturer << endl; 248 cout << " mag : " << mag << " +/- " << magerr << endl; 249 cout << " status : " << status << endl << endl; 232 250 */ 251 233 252 Int_t statuskey = serv.QueryKeyOfName("Status", status.Data()); 234 253 Int_t objectkey = serv.QueryKeyOfName("Object", object.Data()); … … 241 260 query=Form("fTimeStamp='%s', fExposure=%s, fFitsFileKEY=%d, " 242 261 "fObjectKEY=%d, fSkyLevel=%s, fFWHM=%s, " 243 "f ApertureRadius=%s, fInstrumentalMag=%s, "244 "fInstrumentalMag Err=%s, fStatusKEY=%d, fCCDKEY=%d, "245 "f FilterKEY=%d, fTelescopeKEY=%d, fBandKEY=%d, "246 "f ZenithDistance=%.1f ",262 "fEllipticity=%s, fPosAngle=%s, fApertureRadius=%s, " 263 "fInstrumentalMag=%s, fInstrumentalMagErr=%s, " 264 "fStatusKEY=%d, fCCDKEY=%d, fFilterKEY=%d, " 265 "fTelescopeKEY=%d, fBandKEY=%d, fZenithDistance=%.1f ", 247 266 timestamp.Data(), exposure.Data(), fitsfilekey, 248 267 objectkey, skylevel.Data(), fwhm.Data(), 249 aperturer.Data(), mag.Data(), magerr.Data(), 250 statuskey, ccdkey, filterkey, telkey, bandkey, zd); 268 ellipticity.Data(), posangle.Data(), aperturer.Data(), 269 mag.Data(), magerr.Data(), statuskey, ccdkey, 270 filterkey, telkey, bandkey, zd); 251 271 252 272 /* -
trunk/MagicSoft/Mars/datacenter/scripts/copyscript
r8742 r9131 216 216 #moving the files 217 217 file="" 218 opticalfiles=`find $transdir/optical - name '*.instr'`218 opticalfiles=`find $transdir/optical -regextype posix-egrep -regex '^$transdir/optical/20[0-9][0-9]_[0-1][0-9]_[0-3][0-9]_.*_[RV][_]?[12]?[.]instr$'` 219 219 for opticalfile in $opticalfiles 220 220 do … … 243 243 fi 244 244 ;; 245 3) echo " checkfilloptical=$checkfilloptical - Error: position of one object is missing in the database" >> $scriptlog 2>&1 246 printprocesslog "ERROR filloptical.C failed for $opticalfile because the position of one object is missing in the database" 247 continue 248 ;; 249 *) echo " checkfilloptical=$checkfilloptical - Error -> go on with next file" >> $scriptlog 2>&1 250 printprocesslog "ERROR filloptical.C failed for $opticalfile" 251 continue 252 ;; 245 3) echo " checkfilloptical=$checkfilloptical - ERROR filloptical.C failed for $opticalfile: position of one object is missing in the database" >> $scriptlog 2>&1 246 printprocesslog "ERROR filloptical.C failed for $opticalfile: position of one object is missing in the database" 247 continue ;; 248 4) echo " checkfilloptical=$checkfilloptical - ERROR filloptical.C failed for $opticalfile: telescope line with more or less than 2 arguments" >> $scriptlog 2>&1 249 printprocesslog "ERROR filloptical.C failed for $opticalfile: telescope line with more or less than 2 arguments" 250 continue ;; 251 5) echo " checkfilloptical=$checkfilloptical - ERROR filloptical.C failed for $opticalfile: timestamp line with more or less than 4 arguments" >> $scriptlog 2>&1 252 printprocesslog "ERROR filloptical.C failed for $opticalfile: timestamp line with more or less than 4 arguments" 253 continue ;; 254 6) echo " checkfilloptical=$checkfilloptical - ERROR filloptical.C failed for $opticalfile: object line with more or less than 8 arguments" >> $scriptlog 2>&1 255 printprocesslog "ERROR filloptical.C failed for $opticalfile: object line with more or less than 8 arguments" 256 continue ;; 257 *) echo " checkfilloptical=$checkfilloptical - ERROR filloptical.C failed for $opticalfile -> go on with next file" >> $scriptlog 2>&1 258 printprocesslog "ERROR filloptical.C failed for $opticalfile (returned $checkfilloptical)" 259 continue ;; 253 260 esac 254 261 done -
trunk/MagicSoft/Mars/datacenter/scripts/dbchk
r9128 r9131 161 161 # CHECK 2 162 162 echo "Checking if all sequences in Sequences have a corresponding sequence files" >> $scriptlog 2>&1 163 sequences=`echo SELECT fSequenceFirst FROM Sequences | mymysql`163 sequences=`echo SELECT fSequenceFirst FROM Sequences left join SequenceProcessStatus using (fSequenceFirst,fTelescopeNumber) where not isnull(fSequenceFileWritten) | mymysql` 164 164 for sequence in $sequences 165 165 do -
trunk/MagicSoft/Mars/datacenter/tools/fillobjects.C
r8405 r9131 118 118 119 119 query+=Form(", fObjectName='%s/%s'", (*arr)[0]->GetName(), (*arr)[1]->GetName()); 120 where=Form(" fObjectName='%s/%s'", (*arr)[0]->GetName(), (*arr)[1]->GetName()); 120 121 delete arr; 121 122 122 if (serv.Insert ("Object", query)==kFALSE)123 if (serv.InsertUpdate("Object", query, where)==kFALSE) 123 124 return 2; 124 125 num +=1; -
trunk/MagicSoft/Mars/datacenter/tools/fillobjects2.C
r8405 r9131 118 118 119 119 query+=Form(", fObjectName='%s'", object.Data()); 120 where=Form(" fObjectName='%s'", object.Data()); 120 121 121 if (serv.Insert ("Object", query)==kFALSE)122 if (serv.InsertUpdate("Object", query, where)==kFALSE) 122 123 return 2; 123 124 num +=1; -
trunk/MagicSoft/Mars/resources/TeVsources.txt
r8405 r9131 48 48 B3_2247+381 - 22 50 05.7 +38 24 37 - ? 49 49 3C_454.3 - 22 53 57.7 +16 08 54 - ? 50 -------------------------------------------------------------- 51 RGB_0152+017 - 01 52 39.6 +01 47 17 - ? 52 MS_0158+002 - 02 01 06.2 +00 34 00 - ? 53 4C_29_45 - 11 59 31.8 +29 14 44 - ? 54 ON_238 - 12 24 54.4 +21 22 46 - ? 55 PKS_1510-089 - 15 12 50.5 -09 05 59 - ? 56 B2_1633+38 - 16 35 15.5 +38 08 04 - ? -
trunk/MagicSoft/Mars/resources/good_compstars_R.txt
r8405 r9131 4 4 1ES_0033+595 D 13.66 1.46 prim 5 5 1ES_0033+595 E 13.91 0.55 - 6 1ES_0033+595 F 16.67 0.87 control 6 7 7 8 1ES_0120+340 A 13.13 0.50 - … … 10 11 1ES_0120+340 D 14.02 0.51 - 11 12 1ES_0120+340 E 13.55 0.56 - 13 1ES_0120+340 F 16.76 0.57 - 14 1ES_0120+340 G 16.43 0.45 control 12 15 13 16 RGB_0136+391 A 13.13 0.60 control … … 16 19 RGB_0136+391 D 14.42 0.46 - 17 20 RGB_0136+391 E 14.84 0.51 - 21 RGB_0136+391 F 16.56 0.42 - 22 23 RGB_0152+017 A 14.35 0.50 control 24 RGB_0152+017 B 14.22 0.50 prim 25 RGB_0152+017 C 16.80 0.50 - 26 RGB_0152+017 D 17.25 0.50 - 27 RGB_0152+017 E 15.88 0.50 - 28 29 MS_0158+002 A 12.75 0.37 prim 30 MS_0158+002 B 12.76 0.54 control 18 31 19 32 RGB_0214+517 A 13.85 0.51 prim … … 22 35 RGB_0214+517 D 15.09 0.47 - 23 36 RGB_0214+517 E 15.19 0.44 - 24 RGB_0214+517 F1 15.55 0.50 - 25 RGB_0214+517 F2 15.61 0.50 - 26 RGB_0214+517 F3 15.80 0.50 - 27 28 29 3C_66A A 13.38 0.22 prim 30 3C_66A B 14.28 0.49 control 31 3C_66A C1 12.70 0.09 - 32 3C_66A C2 13.62 0.56 - 37 38 3C_66A A 13.38 0.22 prim 39 3C_66A B 14.28 0.49 control 40 3C_66A C1 12.70 0.09 - 41 3C_66A C2 13.62 0.56 - 33 42 34 43 1ES_0229+200 A 13.80 0.50 prim 44 1ES_0229+200 B 16.05 0.50 - 45 1ES_0229+200 C 15.83 0.50 control 35 46 36 47 AO_0235+164 1 12.69 0.34 - … … 43 54 HB89_0317+185 A 11.55 0.31 - 44 55 HB89_0317+185 B 13.33 0.43 prim 56 HB89_0317+185 C 20.00 0.50 control 45 57 46 58 1ES_0323+022 A 12.33 0.52 - … … 77 89 1ES_0806+524 C5 15.32 0.30 - 78 90 91 0836+710 A 16.59 1.01 control 79 92 0836+710 B 14.85 0.45 - 80 93 0836+710 C 13.53 0.38 prim … … 86 99 OJ_287 C2 15.66 0.46 - 87 100 101 S4_0954+65 C1 13.96 0.41 prim 102 S4_0954+65 C2 14.12 0.49 - 103 S4_0954+65 C3 14.25 0.69 - 104 S4_0954+65 C4 14.43 0.92 - 105 S4_0954+65 C6 15.69 0.48 control 106 88 107 1ES_1011+496 A 13.40 0.47 - 89 108 1ES_1011+496 B 15.44 0.44 control … … 105 124 RGB_1117+202 A 11.90 0.38 - 106 125 RGB_1117+202 B 12.02 0.38 - 126 RGB_1117+202 C 20.00 0.50 - 107 127 RGB_1117+202 D 14.82 0.70 - 108 128 RGB_1117+202 E 13.56 0.42 prim … … 113 133 Mkn_180 3 15.13 0.36 - 114 134 Mkn_180 4 15.66 0.34 - 115 Mkn_180 F1 15.93 0.50 -116 Mkn_180 F2 15.96 0.50 -117 135 118 136 RGB_1136+676 A 14.48 0.66 - … … 122 140 RGB_1136+676 E 15.80 0.42 control 123 141 142 4C_29_45 13 14.97 0.39 prim 143 4C_29_45 14 15.53 0.36 control 144 4C_29_45 15 16.30 0.3 - 145 4C_29_45 1 13.01 0.38 - 146 124 147 ON_325 B 14.59 0.37 prim 148 ON_325 C1 16.21 0.29 control 125 149 126 150 1ES_1218+304 A 12.06 0.41 - 127 151 1ES_1218+304 B 13.61 0.40 prim 128 152 1ES_1218+304 C 15.58 0.62 control 129 1ES_1218+304 F1 15.59 0.50 -130 153 131 154 ON_231 A 11.72 0.36 - 155 ON_231 C1 16.03 0.57 control 132 156 ON_231 D 13.86 0.95 prim 157 158 ON_238 1 13.84 0.35 prim 159 ON_238 2 14.56 0.30 - 160 ON_238 3 15.26 0.40 - 161 ON_238 4 15.83 0.41 control 162 163 3C_273 C 11.30 0.57 - 164 3C_273 D 12.31 0.37 - 165 3C_273 E 12.27 0.42 prim 166 3C_273 G 13.16 0.40 control 133 167 134 168 3C_279 1 15.45 0.49 control … … 136 170 3C_279 3 14.53 0.37 prim 137 171 3C_279 4 12.57 0.43 - 172 3C_279 5 20.00 0.00 - 138 173 3C_279 6 12.45 0.36 - 139 174 3C_279 7 15.13 0.53 - … … 142 177 RGB_1417+257 A 13.78 0.57 prim 143 178 RGB_1417+257 C1 15.29 1.16 - 179 RGB_1417+257 C2 16.13 0.59 control 144 180 145 181 PG_1424+240 C1 13.20 0.39 prim … … 152 188 1ES_1426+428 D 15.20 0.33 - 153 189 154 1ES_1544+820 A 14.59 0.37 - 155 1ES_1544+820 B 15.35 0.80 control 156 1ES_1544+820 C 14.41 0.38 - 157 1ES_1544+820 D 12.87 0.31 prim 158 1ES_1544+820 E 14.24 0.41 - 159 160 Mkn_501 1 12.11 0.50 - 190 PKS_1510-089 A 14.25 0.37 prim 191 PKS_1510-089 B 14.63 0.55 control 192 PKS_1510-089 C 16.93 0.59 - 193 PKS_1510-089 D 16.10 0.43 - 194 PKS_1510-089 1 11.14 0.40 - 195 PKS_1510-089 2 12.88 0.29 - 196 PKS_1510-089 3 13.95 0.40 - 197 PKS_1510-089 5 14.35 0.35 - 198 199 B2_1633+38 A 15.48 0.35 prim 200 B2_1633+38 B 15.44 0.47 control 201 B2_1633+38 C 17.22 0.69 - 202 203 Mkn_501 1 12.11 0.50 control 161 204 Mkn_501 2 12.79 0.44 - 162 Mkn_501 3 14.80 0.44 control205 Mkn_501 3 14.80 0.44 - 163 206 Mkn_501 4 14.96 0.34 prim 164 Mkn_501 5 15.08 0.43 prim207 Mkn_501 5 15.08 0.43 - 165 208 Mkn_501 6 14.99 0.68 prim 166 Mkn_501 F1 15.78 0.50 -167 209 168 210 H_1722+119 C1 10.94 1.04 -
Note:
See TracChangeset
for help on using the changeset viewer.