Commit 2af5a9b8d7e4d4769be6f2399f5ccb5503c96ed6
1 parent
9c2b31a4
Add energy dispersion information to CIF file.
Showing
1 changed file
with
8 additions
and
8 deletions
scripts/cta_root2caldb.py
| @@ -359,14 +359,14 @@ class caldb(): | @@ -359,14 +359,14 @@ class caldb(): | ||
| 359 | Keywords: | 359 | Keywords: |
| 360 | None | 360 | None |
| 361 | """ | 361 | """ |
| 362 | - # Append 3 rows to CIF extension | ||
| 363 | - self.hdu_cif.append_rows(3) | 362 | + # Append 4 rows to CIF extension |
| 363 | + self.hdu_cif.append_rows(4) | ||
| 364 | 364 | ||
| 365 | - # Add generic information for these 3 rows | ||
| 366 | - for i in range(3): | 365 | + # Add generic information for these 4 rows |
| 366 | + for i in range(4): | ||
| 367 | 367 | ||
| 368 | # Set row number | 368 | # Set row number |
| 369 | - row = i+self.hdu_cif.nrows()-3 | 369 | + row = i+self.hdu_cif.nrows()-4 |
| 370 | 370 | ||
| 371 | # Set element | 371 | # Set element |
| 372 | self.hdu_cif["TELESCOP"][row] = self.cal_tel | 372 | self.hdu_cif["TELESCOP"][row] = self.cal_tel |
| @@ -383,7 +383,7 @@ class caldb(): | @@ -383,7 +383,7 @@ class caldb(): | ||
| 383 | self.hdu_cif["CAL_DATE"][row] = self.cal_date | 383 | self.hdu_cif["CAL_DATE"][row] = self.cal_date |
| 384 | 384 | ||
| 385 | # Add effective area information | 385 | # Add effective area information |
| 386 | - row = self.hdu_cif.nrows()-3 | 386 | + row = self.hdu_cif.nrows()-4 |
| 387 | self.hdu_cif["CAL_DIR"][row] = self.ea_dir | 387 | self.hdu_cif["CAL_DIR"][row] = self.ea_dir |
| 388 | self.hdu_cif["CAL_FILE"][row] = self.ea_file | 388 | self.hdu_cif["CAL_FILE"][row] = self.ea_file |
| 389 | self.hdu_cif["CAL_CNAM"][row] = self.ea_name | 389 | self.hdu_cif["CAL_CNAM"][row] = self.ea_name |
| @@ -396,7 +396,7 @@ class caldb(): | @@ -396,7 +396,7 @@ class caldb(): | ||
| 396 | self.hdu_cif["CAL_CBD"][row, n] = self.ea_bounds[n] | 396 | self.hdu_cif["CAL_CBD"][row, n] = self.ea_bounds[n] |
| 397 | 397 | ||
| 398 | # Add point spread function information | 398 | # Add point spread function information |
| 399 | - row = self.hdu_cif.nrows()-2 | 399 | + row = self.hdu_cif.nrows()-3 |
| 400 | self.hdu_cif["CAL_DIR"][row] = self.psf_dir | 400 | self.hdu_cif["CAL_DIR"][row] = self.psf_dir |
| 401 | self.hdu_cif["CAL_FILE"][row] = self.psf_file | 401 | self.hdu_cif["CAL_FILE"][row] = self.psf_file |
| 402 | self.hdu_cif["CAL_CNAM"][row] = self.psf_name | 402 | self.hdu_cif["CAL_CNAM"][row] = self.psf_name |
| @@ -409,7 +409,7 @@ class caldb(): | @@ -409,7 +409,7 @@ class caldb(): | ||
| 409 | self.hdu_cif["CAL_CBD"][row, n] = self.psf_bounds[n] | 409 | self.hdu_cif["CAL_CBD"][row, n] = self.psf_bounds[n] |
| 410 | 410 | ||
| 411 | # Add energy dispersion information | 411 | # Add energy dispersion information |
| 412 | - row = self.hdu_cif.nrows()-1 | 412 | + row = self.hdu_cif.nrows()-2 |
| 413 | self.hdu_cif["CAL_DIR"][row] = self.edisp_dir | 413 | self.hdu_cif["CAL_DIR"][row] = self.edisp_dir |
| 414 | self.hdu_cif["CAL_FILE"][row] = self.edisp_file | 414 | self.hdu_cif["CAL_FILE"][row] = self.edisp_file |
| 415 | self.hdu_cif["CAL_CNAM"][row] = self.edisp_name | 415 | self.hdu_cif["CAL_CNAM"][row] = self.edisp_name |