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 | 359 | Keywords: |
| 360 | 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 | 368 | # Set row number |
| 369 | - row = i+self.hdu_cif.nrows()-3 | |
| 369 | + row = i+self.hdu_cif.nrows()-4 | |
| 370 | 370 | |
| 371 | 371 | # Set element |
| 372 | 372 | self.hdu_cif["TELESCOP"][row] = self.cal_tel |
| ... | ... | @@ -383,7 +383,7 @@ class caldb(): |
| 383 | 383 | self.hdu_cif["CAL_DATE"][row] = self.cal_date |
| 384 | 384 | |
| 385 | 385 | # Add effective area information |
| 386 | - row = self.hdu_cif.nrows()-3 | |
| 386 | + row = self.hdu_cif.nrows()-4 | |
| 387 | 387 | self.hdu_cif["CAL_DIR"][row] = self.ea_dir |
| 388 | 388 | self.hdu_cif["CAL_FILE"][row] = self.ea_file |
| 389 | 389 | self.hdu_cif["CAL_CNAM"][row] = self.ea_name |
| ... | ... | @@ -396,7 +396,7 @@ class caldb(): |
| 396 | 396 | self.hdu_cif["CAL_CBD"][row, n] = self.ea_bounds[n] |
| 397 | 397 | |
| 398 | 398 | # Add point spread function information |
| 399 | - row = self.hdu_cif.nrows()-2 | |
| 399 | + row = self.hdu_cif.nrows()-3 | |
| 400 | 400 | self.hdu_cif["CAL_DIR"][row] = self.psf_dir |
| 401 | 401 | self.hdu_cif["CAL_FILE"][row] = self.psf_file |
| 402 | 402 | self.hdu_cif["CAL_CNAM"][row] = self.psf_name |
| ... | ... | @@ -409,7 +409,7 @@ class caldb(): |
| 409 | 409 | self.hdu_cif["CAL_CBD"][row, n] = self.psf_bounds[n] |
| 410 | 410 | |
| 411 | 411 | # Add energy dispersion information |
| 412 | - row = self.hdu_cif.nrows()-1 | |
| 412 | + row = self.hdu_cif.nrows()-2 | |
| 413 | 413 | self.hdu_cif["CAL_DIR"][row] = self.edisp_dir |
| 414 | 414 | self.hdu_cif["CAL_FILE"][row] = self.edisp_file |
| 415 | 415 | self.hdu_cif["CAL_CNAM"][row] = self.edisp_name | ... | ... |