Commit b1ebe3854dbac73b28eaffd1362323cbb294bb83
1 parent
ed3164c6
updated for new column definition (v1.0.0)
Showing
6 changed files
with
107 additions
and
109 deletions
inst/cta/include/GCTAEventAtom.hpp
| @@ -4,10 +4,18 @@ | @@ -4,10 +4,18 @@ | ||
| 4 | * copyright (C) 2010-2011 by Jurgen Knodlseder * | 4 | * copyright (C) 2010-2011 by Jurgen Knodlseder * |
| 5 | * ----------------------------------------------------------------------- * | 5 | * ----------------------------------------------------------------------- * |
| 6 | * * | 6 | * * |
| 7 | - * This program is free software; you can redistribute it and/or modify * | ||
| 8 | - * it under the terms of the GNU General Public License as published by * | ||
| 9 | - * the Free Software Foundation; either version 2 of the License, or * | ||
| 10 | - * (at your option) any later version. * | 7 | + * This program is free software: you can redistribute it and/or modify * |
| 8 | + * it under the terms of the GNU General Public License as published by * | ||
| 9 | + * the Free Software Foundation, either version 3 of the License, or * | ||
| 10 | + * (at your option) any later version. * | ||
| 11 | + * * | ||
| 12 | + * This program is distributed in the hope that it will be useful, * | ||
| 13 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of * | ||
| 14 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * | ||
| 15 | + * GNU General Public License for more details. * | ||
| 16 | + * * | ||
| 17 | + * You should have received a copy of the GNU General Public License * | ||
| 18 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. * | ||
| 11 | * * | 19 | * * |
| 12 | ***************************************************************************/ | 20 | ***************************************************************************/ |
| 13 | /** | 21 | /** |
| @@ -67,30 +75,26 @@ protected: | @@ -67,30 +75,26 @@ protected: | ||
| 67 | void free_members(void); | 75 | void free_members(void); |
| 68 | 76 | ||
| 69 | // Protected members | 77 | // Protected members |
| 70 | - GCTAInstDir m_dir; //!< Event direction | ||
| 71 | - GEnergy m_energy; //!< Event energy | ||
| 72 | - GTime m_time; //!< Event time | ||
| 73 | - long m_event_id; //!< Event identifier | ||
| 74 | - char m_flags; //!< Flags | ||
| 75 | - int m_multip; //!< Multiplicity | ||
| 76 | - char m_telmask; //!< Telescope mask | ||
| 77 | - float m_dir_err; //!< Error on event direction | ||
| 78 | - float m_detx; //!< | ||
| 79 | - float m_dety; //!< | ||
| 80 | - float m_alt_pnt; //!< Pointing altitude | ||
| 81 | - float m_az_pnt; //!< Pointing azimuth | ||
| 82 | - float m_alt; //!< Event altitude | ||
| 83 | - float m_az; //!< Event azimuth | ||
| 84 | - float m_corex; //!< | ||
| 85 | - float m_corey; //!< | ||
| 86 | - float m_core_err; //!< | ||
| 87 | - float m_xmax; //!< | ||
| 88 | - float m_xmax_err; //!< | ||
| 89 | - float m_energy_err; //!< Error on event energy (MeV) | ||
| 90 | - float m_hil_msw; //!< Hillas width | ||
| 91 | - float m_hil_msw_err; //!< Error on Hillas width | ||
| 92 | - float m_hil_msl; //!< Hillas length | ||
| 93 | - float m_hil_msl_err; //!< Error on Hillas length | 78 | + GCTAInstDir m_dir; //!< Event direction |
| 79 | + GEnergy m_energy; //!< Event energy | ||
| 80 | + GTime m_time; //!< Event time | ||
| 81 | + unsigned long m_event_id; //!< Event identifier | ||
| 82 | + unsigned long m_obs_id; //!< Observation identifier | ||
| 83 | + int m_multip; //!< Multiplicity | ||
| 84 | + char m_telmask; //!< Telescope mask | ||
| 85 | + float m_dir_err; //!< Error on event direction | ||
| 86 | + float m_detx; //!< Tangential coordinate in nominal sys | ||
| 87 | + float m_dety; //!< Tangential coordinate in nominal sys | ||
| 88 | + float m_alt; //!< Event altitude | ||
| 89 | + float m_az; //!< Event azimuth | ||
| 90 | + float m_corex; //!< Position on ground (m) | ||
| 91 | + float m_corey; //!< Position on ground (m) | ||
| 92 | + float m_core_err; //!< Error on core reconstruction | ||
| 93 | + float m_xmax; //!< Position of shower max (g/cm2) | ||
| 94 | + float m_xmax_err; //!< Error on shower max (g/cm2) | ||
| 95 | + float m_shwidth; //!< Shower width (m) | ||
| 96 | + float m_shlength; //!< Shower length (m) | ||
| 97 | + float m_energy_err; //!< Error on event energy (MeV) | ||
| 94 | }; | 98 | }; |
| 95 | 99 | ||
| 96 | #endif /* GCTAEVENTATOM_HPP */ | 100 | #endif /* GCTAEVENTATOM_HPP */ |
inst/cta/include/GCTAEventList.hpp
| @@ -4,10 +4,18 @@ | @@ -4,10 +4,18 @@ | ||
| 4 | * copyright (C) 2010-2011 by Jurgen Knodlseder * | 4 | * copyright (C) 2010-2011 by Jurgen Knodlseder * |
| 5 | * ----------------------------------------------------------------------- * | 5 | * ----------------------------------------------------------------------- * |
| 6 | * * | 6 | * * |
| 7 | - * This program is free software; you can redistribute it and/or modify * | ||
| 8 | - * it under the terms of the GNU General Public License as published by * | ||
| 9 | - * the Free Software Foundation; either version 2 of the License, or * | ||
| 10 | - * (at your option) any later version. * | 7 | + * This program is free software: you can redistribute it and/or modify * |
| 8 | + * it under the terms of the GNU General Public License as published by * | ||
| 9 | + * the Free Software Foundation, either version 3 of the License, or * | ||
| 10 | + * (at your option) any later version. * | ||
| 11 | + * * | ||
| 12 | + * This program is distributed in the hope that it will be useful, * | ||
| 13 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of * | ||
| 14 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * | ||
| 15 | + * GNU General Public License for more details. * | ||
| 16 | + * * | ||
| 17 | + * You should have received a copy of the GNU General Public License * | ||
| 18 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. * | ||
| 11 | * * | 19 | * * |
| 12 | ***************************************************************************/ | 20 | ***************************************************************************/ |
| 13 | /** | 21 | /** |
inst/cta/src/GCTAEventAtom.cpp
| @@ -4,10 +4,18 @@ | @@ -4,10 +4,18 @@ | ||
| 4 | * copyright (C) 2010 by Jurgen Knodlseder * | 4 | * copyright (C) 2010 by Jurgen Knodlseder * |
| 5 | * ----------------------------------------------------------------------- * | 5 | * ----------------------------------------------------------------------- * |
| 6 | * * | 6 | * * |
| 7 | - * This program is free software; you can redistribute it and/or modify * | ||
| 8 | - * it under the terms of the GNU General Public License as published by * | ||
| 9 | - * the Free Software Foundation; either version 2 of the License, or * | ||
| 10 | - * (at your option) any later version. * | 7 | + * This program is free software: you can redistribute it and/or modify * |
| 8 | + * it under the terms of the GNU General Public License as published by * | ||
| 9 | + * the Free Software Foundation, either version 3 of the License, or * | ||
| 10 | + * (at your option) any later version. * | ||
| 11 | + * * | ||
| 12 | + * This program is distributed in the hope that it will be useful, * | ||
| 13 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of * | ||
| 14 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * | ||
| 15 | + * GNU General Public License for more details. * | ||
| 16 | + * * | ||
| 17 | + * You should have received a copy of the GNU General Public License * | ||
| 18 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. * | ||
| 11 | * * | 19 | * * |
| 12 | ***************************************************************************/ | 20 | ***************************************************************************/ |
| 13 | /** | 21 | /** |
| @@ -193,14 +201,12 @@ void GCTAEventAtom::init_members(void) | @@ -193,14 +201,12 @@ void GCTAEventAtom::init_members(void) | ||
| 193 | m_time.clear(); | 201 | m_time.clear(); |
| 194 | m_energy.clear(); | 202 | m_energy.clear(); |
| 195 | m_event_id = 0; | 203 | m_event_id = 0; |
| 196 | - m_flags = 0; | 204 | + m_obs_id = 0; |
| 197 | m_multip = 0; | 205 | m_multip = 0; |
| 198 | m_telmask = 0; | 206 | m_telmask = 0; |
| 199 | m_dir_err = 0.0; | 207 | m_dir_err = 0.0; |
| 200 | m_detx = 0.0; | 208 | m_detx = 0.0; |
| 201 | m_dety = 0.0; | 209 | m_dety = 0.0; |
| 202 | - m_alt_pnt = 0.0; | ||
| 203 | - m_az_pnt = 0.0; | ||
| 204 | m_alt = 0.0; | 210 | m_alt = 0.0; |
| 205 | m_az = 0.0; | 211 | m_az = 0.0; |
| 206 | m_corex = 0.0; | 212 | m_corex = 0.0; |
| @@ -208,11 +214,9 @@ void GCTAEventAtom::init_members(void) | @@ -208,11 +214,9 @@ void GCTAEventAtom::init_members(void) | ||
| 208 | m_core_err = 0.0; | 214 | m_core_err = 0.0; |
| 209 | m_xmax = 0.0; | 215 | m_xmax = 0.0; |
| 210 | m_xmax_err = 0.0; | 216 | m_xmax_err = 0.0; |
| 217 | + m_shwidth = 0.0; | ||
| 218 | + m_shlength = 0.0; | ||
| 211 | m_energy_err = 0.0; | 219 | m_energy_err = 0.0; |
| 212 | - m_hil_msw = 0.0; | ||
| 213 | - m_hil_msw_err = 0.0; | ||
| 214 | - m_hil_msl = 0.0; | ||
| 215 | - m_hil_msl_err = 0.0; | ||
| 216 | 220 | ||
| 217 | // Return | 221 | // Return |
| 218 | return; | 222 | return; |
| @@ -231,14 +235,12 @@ void GCTAEventAtom::copy_members(const GCTAEventAtom& atom) | @@ -231,14 +235,12 @@ void GCTAEventAtom::copy_members(const GCTAEventAtom& atom) | ||
| 231 | m_time = atom.m_time; | 235 | m_time = atom.m_time; |
| 232 | m_energy = atom.m_energy; | 236 | m_energy = atom.m_energy; |
| 233 | m_event_id = atom.m_event_id; | 237 | m_event_id = atom.m_event_id; |
| 234 | - m_flags = atom.m_flags; | 238 | + m_obs_id = atom.m_obs_id; |
| 235 | m_multip = atom.m_multip; | 239 | m_multip = atom.m_multip; |
| 236 | m_telmask = atom.m_telmask; | 240 | m_telmask = atom.m_telmask; |
| 237 | m_dir_err = atom.m_dir_err; | 241 | m_dir_err = atom.m_dir_err; |
| 238 | m_detx = atom.m_detx; | 242 | m_detx = atom.m_detx; |
| 239 | m_dety = atom.m_dety; | 243 | m_dety = atom.m_dety; |
| 240 | - m_alt_pnt = atom.m_alt_pnt; | ||
| 241 | - m_az_pnt = atom.m_az_pnt; | ||
| 242 | m_alt = atom.m_alt; | 244 | m_alt = atom.m_alt; |
| 243 | m_az = atom.m_az; | 245 | m_az = atom.m_az; |
| 244 | m_corex = atom.m_corex; | 246 | m_corex = atom.m_corex; |
| @@ -246,11 +248,9 @@ void GCTAEventAtom::copy_members(const GCTAEventAtom& atom) | @@ -246,11 +248,9 @@ void GCTAEventAtom::copy_members(const GCTAEventAtom& atom) | ||
| 246 | m_core_err = atom.m_core_err; | 248 | m_core_err = atom.m_core_err; |
| 247 | m_xmax = atom.m_xmax; | 249 | m_xmax = atom.m_xmax; |
| 248 | m_xmax_err = atom.m_xmax_err; | 250 | m_xmax_err = atom.m_xmax_err; |
| 251 | + m_shwidth = atom.m_shwidth; | ||
| 252 | + m_shlength = atom.m_shlength; | ||
| 249 | m_energy_err = atom.m_energy_err; | 253 | m_energy_err = atom.m_energy_err; |
| 250 | - m_hil_msw = atom.m_hil_msw; | ||
| 251 | - m_hil_msw_err = atom.m_hil_msw_err; | ||
| 252 | - m_hil_msl = atom.m_hil_msl; | ||
| 253 | - m_hil_msl_err = atom.m_hil_msl_err; | ||
| 254 | 254 | ||
| 255 | // Return | 255 | // Return |
| 256 | return; | 256 | return; |
inst/cta/src/GCTAEventList.cpp
| @@ -525,29 +525,26 @@ void GCTAEventList::read_events(const GFitsTable* table) | @@ -525,29 +525,26 @@ void GCTAEventList::read_events(const GFitsTable* table) | ||
| 525 | m_events.reserve(num); | 525 | m_events.reserve(num); |
| 526 | 526 | ||
| 527 | // Get column pointers | 527 | // Get column pointers |
| 528 | - GFitsTableULongCol* ptr_eid = (GFitsTableULongCol*)&(*table)["EVENT_ID"]; | ||
| 529 | - GFitsTableDoubleCol* ptr_time = (GFitsTableDoubleCol*)&(*table)["TIME"]; | ||
| 530 | - GFitsTableShortCol* ptr_multip = (GFitsTableShortCol*)&(*table)["MULTIP"]; | ||
| 531 | - GFitsTableFloatCol* ptr_ra = (GFitsTableFloatCol*)&(*table)["RA"]; | ||
| 532 | - GFitsTableFloatCol* ptr_dec = (GFitsTableFloatCol*)&(*table)["DEC"]; | ||
| 533 | - GFitsTableFloatCol* ptr_dir_err = (GFitsTableFloatCol*)&(*table)["DIR_ERR"]; | ||
| 534 | - GFitsTableFloatCol* ptr_detx = (GFitsTableFloatCol*)&(*table)["DETX"]; | ||
| 535 | - GFitsTableFloatCol* ptr_dety = (GFitsTableFloatCol*)&(*table)["DETY"]; | ||
| 536 | - GFitsTableFloatCol* ptr_alt_pnt = (GFitsTableFloatCol*)&(*table)["ALT_PNT"]; | ||
| 537 | - GFitsTableFloatCol* ptr_az_pnt = (GFitsTableFloatCol*)&(*table)["AZ_PNT"]; | ||
| 538 | - GFitsTableFloatCol* ptr_alt = (GFitsTableFloatCol*)&(*table)["ALT"]; | ||
| 539 | - GFitsTableFloatCol* ptr_az = (GFitsTableFloatCol*)&(*table)["AZ"]; | ||
| 540 | - GFitsTableFloatCol* ptr_corex = (GFitsTableFloatCol*)&(*table)["COREX"]; | ||
| 541 | - GFitsTableFloatCol* ptr_corey = (GFitsTableFloatCol*)&(*table)["COREY"]; | ||
| 542 | - GFitsTableFloatCol* ptr_core_err = (GFitsTableFloatCol*)&(*table)["CORE_ERR"]; | ||
| 543 | - GFitsTableFloatCol* ptr_xmax = (GFitsTableFloatCol*)&(*table)["XMAX"]; | ||
| 544 | - GFitsTableFloatCol* ptr_xmax_err = (GFitsTableFloatCol*)&(*table)["XMAX_ERR"]; | ||
| 545 | - GFitsTableFloatCol* ptr_energy = (GFitsTableFloatCol*)&(*table)["ENERGY"]; | ||
| 546 | - GFitsTableFloatCol* ptr_energy_err = (GFitsTableFloatCol*)&(*table)["ENERGY_ERR"]; | ||
| 547 | - GFitsTableFloatCol* ptr_hil_msw = (GFitsTableFloatCol*)&(*table)["HIL_MSW"]; | ||
| 548 | - GFitsTableFloatCol* ptr_hil_msw_err = (GFitsTableFloatCol*)&(*table)["HIL_MSW_ERR"]; | ||
| 549 | - GFitsTableFloatCol* ptr_hil_msl = (GFitsTableFloatCol*)&(*table)["HIL_MSL"]; | ||
| 550 | - GFitsTableFloatCol* ptr_hil_msl_err = (GFitsTableFloatCol*)&(*table)["HIL_MSL_ERR"]; | 528 | + GFitsTableULongCol* ptr_eid = (GFitsTableULongCol*)&(*table)["EVENT_ID"]; |
| 529 | + GFitsTableULongCol* ptr_oid = (GFitsTableULongCol*)&(*table)["OBS_ID"]; | ||
| 530 | + GFitsTableDoubleCol* ptr_time = (GFitsTableDoubleCol*)&(*table)["TIME"]; | ||
| 531 | + GFitsTableShortCol* ptr_multip = (GFitsTableShortCol*)&(*table)["MULTIP"]; | ||
| 532 | + GFitsTableFloatCol* ptr_ra = (GFitsTableFloatCol*)&(*table)["RA"]; | ||
| 533 | + GFitsTableFloatCol* ptr_dec = (GFitsTableFloatCol*)&(*table)["DEC"]; | ||
| 534 | + GFitsTableFloatCol* ptr_dir_err = (GFitsTableFloatCol*)&(*table)["DIR_ERR"]; | ||
| 535 | + GFitsTableFloatCol* ptr_detx = (GFitsTableFloatCol*)&(*table)["DETX"]; | ||
| 536 | + GFitsTableFloatCol* ptr_dety = (GFitsTableFloatCol*)&(*table)["DETY"]; | ||
| 537 | + GFitsTableFloatCol* ptr_alt = (GFitsTableFloatCol*)&(*table)["ALT"]; | ||
| 538 | + GFitsTableFloatCol* ptr_az = (GFitsTableFloatCol*)&(*table)["AZ"]; | ||
| 539 | + GFitsTableFloatCol* ptr_corex = (GFitsTableFloatCol*)&(*table)["COREX"]; | ||
| 540 | + GFitsTableFloatCol* ptr_corey = (GFitsTableFloatCol*)&(*table)["COREY"]; | ||
| 541 | + GFitsTableFloatCol* ptr_core_err = (GFitsTableFloatCol*)&(*table)["CORE_ERR"]; | ||
| 542 | + GFitsTableFloatCol* ptr_xmax = (GFitsTableFloatCol*)&(*table)["XMAX"]; | ||
| 543 | + GFitsTableFloatCol* ptr_xmax_err = (GFitsTableFloatCol*)&(*table)["XMAX_ERR"]; | ||
| 544 | + GFitsTableFloatCol* ptr_shw = (GFitsTableFloatCol*)&(*table)["SHWIDTH"]; | ||
| 545 | + GFitsTableFloatCol* ptr_shl = (GFitsTableFloatCol*)&(*table)["SHLENGTH"]; | ||
| 546 | + GFitsTableFloatCol* ptr_energy = (GFitsTableFloatCol*)&(*table)["ENERGY"]; | ||
| 547 | + GFitsTableFloatCol* ptr_energy_err = (GFitsTableFloatCol*)&(*table)["ENERGY_ERR"]; | ||
| 551 | 548 | ||
| 552 | // Copy data from columns into GCTAEventAtom objects | 549 | // Copy data from columns into GCTAEventAtom objects |
| 553 | GCTAEventAtom event; | 550 | GCTAEventAtom event; |
| @@ -556,12 +553,12 @@ void GCTAEventList::read_events(const GFitsTable* table) | @@ -556,12 +553,12 @@ void GCTAEventList::read_events(const GFitsTable* table) | ||
| 556 | event.m_dir.radec_deg((*ptr_ra)(i), (*ptr_dec)(i)); | 553 | event.m_dir.radec_deg((*ptr_ra)(i), (*ptr_dec)(i)); |
| 557 | event.m_energy.TeV((*ptr_energy)(i)); | 554 | event.m_energy.TeV((*ptr_energy)(i)); |
| 558 | event.m_event_id = (*ptr_eid)(i); | 555 | event.m_event_id = (*ptr_eid)(i); |
| 556 | + event.m_obs_id = (*ptr_oid)(i); | ||
| 559 | event.m_multip = (*ptr_multip)(i); | 557 | event.m_multip = (*ptr_multip)(i); |
| 558 | + event.m_telmask = 0; | ||
| 560 | event.m_dir_err = (*ptr_dir_err)(i); | 559 | event.m_dir_err = (*ptr_dir_err)(i); |
| 561 | event.m_detx = (*ptr_detx)(i); | 560 | event.m_detx = (*ptr_detx)(i); |
| 562 | event.m_dety = (*ptr_dety)(i); | 561 | event.m_dety = (*ptr_dety)(i); |
| 563 | - event.m_alt_pnt = (*ptr_alt_pnt)(i); | ||
| 564 | - event.m_az_pnt = (*ptr_az_pnt)(i); | ||
| 565 | event.m_alt = (*ptr_alt)(i); | 562 | event.m_alt = (*ptr_alt)(i); |
| 566 | event.m_az = (*ptr_az)(i); | 563 | event.m_az = (*ptr_az)(i); |
| 567 | event.m_corex = (*ptr_corex)(i); | 564 | event.m_corex = (*ptr_corex)(i); |
| @@ -569,11 +566,9 @@ void GCTAEventList::read_events(const GFitsTable* table) | @@ -569,11 +566,9 @@ void GCTAEventList::read_events(const GFitsTable* table) | ||
| 569 | event.m_core_err = (*ptr_core_err)(i); | 566 | event.m_core_err = (*ptr_core_err)(i); |
| 570 | event.m_xmax = (*ptr_xmax)(i); | 567 | event.m_xmax = (*ptr_xmax)(i); |
| 571 | event.m_xmax_err = (*ptr_xmax_err)(i); | 568 | event.m_xmax_err = (*ptr_xmax_err)(i); |
| 569 | + event.m_shwidth = (*ptr_shw)(i); | ||
| 570 | + event.m_shlength = (*ptr_shl)(i); | ||
| 572 | event.m_energy_err = (*ptr_energy_err)(i); | 571 | event.m_energy_err = (*ptr_energy_err)(i); |
| 573 | - event.m_hil_msw = (*ptr_hil_msw)(i); | ||
| 574 | - event.m_hil_msw_err = (*ptr_hil_msw_err)(i); | ||
| 575 | - event.m_hil_msl = (*ptr_hil_msl)(i); | ||
| 576 | - event.m_hil_msl_err = (*ptr_hil_msl_err)(i); | ||
| 577 | m_events.push_back(event); | 572 | m_events.push_back(event); |
| 578 | } | 573 | } |
| 579 | 574 | ||
| @@ -778,6 +773,7 @@ void GCTAEventList::write_events(GFitsBinTable* hdu) const | @@ -778,6 +773,7 @@ void GCTAEventList::write_events(GFitsBinTable* hdu) const | ||
| 778 | 773 | ||
| 779 | // Allocate columns | 774 | // Allocate columns |
| 780 | GFitsTableULongCol col_eid = GFitsTableULongCol("EVENT_ID", size()); | 775 | GFitsTableULongCol col_eid = GFitsTableULongCol("EVENT_ID", size()); |
| 776 | + GFitsTableULongCol col_oid = GFitsTableULongCol("OBS_ID", size()); | ||
| 781 | GFitsTableDoubleCol col_time = GFitsTableDoubleCol("TIME", size()); | 777 | GFitsTableDoubleCol col_time = GFitsTableDoubleCol("TIME", size()); |
| 782 | GFitsTableDoubleCol col_live = GFitsTableDoubleCol("TLIVE", size()); | 778 | GFitsTableDoubleCol col_live = GFitsTableDoubleCol("TLIVE", size()); |
| 783 | GFitsTableShortCol col_multip = GFitsTableShortCol("MULTIP", size()); | 779 | GFitsTableShortCol col_multip = GFitsTableShortCol("MULTIP", size()); |
| @@ -789,51 +785,45 @@ void GCTAEventList::write_events(GFitsBinTable* hdu) const | @@ -789,51 +785,45 @@ void GCTAEventList::write_events(GFitsBinTable* hdu) const | ||
| 789 | GFitsTableFloatCol col_dety = GFitsTableFloatCol("DETY", size()); | 785 | GFitsTableFloatCol col_dety = GFitsTableFloatCol("DETY", size()); |
| 790 | GFitsTableFloatCol col_alt = GFitsTableFloatCol("ALT", size()); | 786 | GFitsTableFloatCol col_alt = GFitsTableFloatCol("ALT", size()); |
| 791 | GFitsTableFloatCol col_az = GFitsTableFloatCol("AZ", size()); | 787 | GFitsTableFloatCol col_az = GFitsTableFloatCol("AZ", size()); |
| 792 | - GFitsTableFloatCol col_alt_pnt = GFitsTableFloatCol("ALT_PNT", size()); | ||
| 793 | - GFitsTableFloatCol col_az_pnt = GFitsTableFloatCol("AZ_PNT", size()); | ||
| 794 | GFitsTableFloatCol col_corex = GFitsTableFloatCol("COREX", size()); | 788 | GFitsTableFloatCol col_corex = GFitsTableFloatCol("COREX", size()); |
| 795 | GFitsTableFloatCol col_corey = GFitsTableFloatCol("COREY", size()); | 789 | GFitsTableFloatCol col_corey = GFitsTableFloatCol("COREY", size()); |
| 796 | GFitsTableFloatCol col_core_err = GFitsTableFloatCol("CORE_ERR", size()); | 790 | GFitsTableFloatCol col_core_err = GFitsTableFloatCol("CORE_ERR", size()); |
| 797 | GFitsTableFloatCol col_xmax = GFitsTableFloatCol("XMAX", size()); | 791 | GFitsTableFloatCol col_xmax = GFitsTableFloatCol("XMAX", size()); |
| 798 | GFitsTableFloatCol col_xmax_err = GFitsTableFloatCol("XMAX_ERR", size()); | 792 | GFitsTableFloatCol col_xmax_err = GFitsTableFloatCol("XMAX_ERR", size()); |
| 793 | + GFitsTableFloatCol col_shw = GFitsTableFloatCol("SHWIDTH", size()); | ||
| 794 | + GFitsTableFloatCol col_shl = GFitsTableFloatCol("SHLENGTH", size()); | ||
| 799 | GFitsTableFloatCol col_energy = GFitsTableFloatCol("ENERGY", size()); | 795 | GFitsTableFloatCol col_energy = GFitsTableFloatCol("ENERGY", size()); |
| 800 | GFitsTableFloatCol col_energy_err = GFitsTableFloatCol("ENERGY_ERR", size()); | 796 | GFitsTableFloatCol col_energy_err = GFitsTableFloatCol("ENERGY_ERR", size()); |
| 801 | - GFitsTableFloatCol col_hil_msw = GFitsTableFloatCol("HIL_MSW", size()); | ||
| 802 | - GFitsTableFloatCol col_hil_msw_err = GFitsTableFloatCol("HIL_MSW_ERR", size()); | ||
| 803 | - GFitsTableFloatCol col_hil_msl = GFitsTableFloatCol("HIL_MSL", size()); | ||
| 804 | - GFitsTableFloatCol col_hil_msl_err = GFitsTableFloatCol("HIL_MSL_ERR", size()); | ||
| 805 | 797 | ||
| 806 | // Fill columns | 798 | // Fill columns |
| 807 | for (int i = 0; i < size(); ++i) { | 799 | for (int i = 0; i < size(); ++i) { |
| 808 | - col_eid(i) = i; | 800 | + col_eid(i) = m_events[i].m_event_id; |
| 801 | + col_oid(i) = m_events[i].m_obs_id; | ||
| 809 | col_time(i) = m_events[i].time().met(); | 802 | col_time(i) = m_events[i].time().met(); |
| 810 | col_live(i) = 0.0; | 803 | col_live(i) = 0.0; |
| 811 | col_multip(i) = 0; | 804 | col_multip(i) = 0; |
| 812 | //col_telmask | 805 | //col_telmask |
| 813 | col_ra(i) = m_events[i].dir().ra_deg(); | 806 | col_ra(i) = m_events[i].dir().ra_deg(); |
| 814 | col_dec(i) = m_events[i].dir().dec_deg(); | 807 | col_dec(i) = m_events[i].dir().dec_deg(); |
| 815 | - col_direrr(i) = 0.0; | ||
| 816 | - col_detx(i) = 0.0; | ||
| 817 | - col_dety(i) = 0.0; | ||
| 818 | - col_alt(i) = 0.0; | ||
| 819 | - col_az(i) = 0.0; | ||
| 820 | - col_alt_pnt(i) = 0.0; | ||
| 821 | - col_az_pnt(i) = 0.0; | ||
| 822 | - col_corex(i) = 0.0; | ||
| 823 | - col_corey(i) = 0.0; | ||
| 824 | - col_core_err(i) = 0.0; | ||
| 825 | - col_xmax(i) = 0.0; | ||
| 826 | - col_xmax_err(i) = 0.0; | 808 | + col_direrr(i) = m_events[i].m_dir_err; |
| 809 | + col_detx(i) = m_events[i].m_detx; | ||
| 810 | + col_dety(i) = m_events[i].m_dety; | ||
| 811 | + col_alt(i) = m_events[i].m_alt; | ||
| 812 | + col_az(i) = m_events[i].m_az; | ||
| 813 | + col_corex(i) = m_events[i].m_corex; | ||
| 814 | + col_corey(i) = m_events[i].m_corey; | ||
| 815 | + col_core_err(i) = m_events[i].m_core_err; | ||
| 816 | + col_xmax(i) = m_events[i].m_xmax; | ||
| 817 | + col_xmax_err(i) = m_events[i].m_xmax_err; | ||
| 818 | + col_shw(i) = m_events[i].m_shwidth; | ||
| 819 | + col_shl(i) = m_events[i].m_shlength; | ||
| 827 | col_energy(i) = m_events[i].energy().TeV(); | 820 | col_energy(i) = m_events[i].energy().TeV(); |
| 828 | - col_energy_err(i) = 0.0; | ||
| 829 | - col_hil_msw(i) = 0.0; | ||
| 830 | - col_hil_msw_err(i) = 0.0; | ||
| 831 | - col_hil_msl(i) = 0.0; | ||
| 832 | - col_hil_msl_err(i) = 0.0; | 821 | + col_energy_err(i) = m_events[i].m_energy_err; |
| 833 | } // endfor: looped over rows | 822 | } // endfor: looped over rows |
| 834 | 823 | ||
| 835 | // Append columns to table | 824 | // Append columns to table |
| 836 | hdu->append_column(col_eid); | 825 | hdu->append_column(col_eid); |
| 826 | + hdu->append_column(col_oid); | ||
| 837 | hdu->append_column(col_time); | 827 | hdu->append_column(col_time); |
| 838 | hdu->append_column(col_live); | 828 | hdu->append_column(col_live); |
| 839 | hdu->append_column(col_multip); | 829 | hdu->append_column(col_multip); |
| @@ -845,19 +835,15 @@ void GCTAEventList::write_events(GFitsBinTable* hdu) const | @@ -845,19 +835,15 @@ void GCTAEventList::write_events(GFitsBinTable* hdu) const | ||
| 845 | hdu->append_column(col_dety); | 835 | hdu->append_column(col_dety); |
| 846 | hdu->append_column(col_alt); | 836 | hdu->append_column(col_alt); |
| 847 | hdu->append_column(col_az); | 837 | hdu->append_column(col_az); |
| 848 | - hdu->append_column(col_alt_pnt); | ||
| 849 | - hdu->append_column(col_az_pnt); | ||
| 850 | hdu->append_column(col_corex); | 838 | hdu->append_column(col_corex); |
| 851 | hdu->append_column(col_corey); | 839 | hdu->append_column(col_corey); |
| 852 | hdu->append_column(col_core_err); | 840 | hdu->append_column(col_core_err); |
| 853 | hdu->append_column(col_xmax); | 841 | hdu->append_column(col_xmax); |
| 854 | hdu->append_column(col_xmax_err); | 842 | hdu->append_column(col_xmax_err); |
| 843 | + hdu->append_column(col_shw); | ||
| 844 | + hdu->append_column(col_shl); | ||
| 855 | hdu->append_column(col_energy); | 845 | hdu->append_column(col_energy); |
| 856 | hdu->append_column(col_energy_err); | 846 | hdu->append_column(col_energy_err); |
| 857 | - hdu->append_column(col_hil_msw); | ||
| 858 | - hdu->append_column(col_hil_msw_err); | ||
| 859 | - hdu->append_column(col_hil_msl); | ||
| 860 | - hdu->append_column(col_hil_msl_err); | ||
| 861 | 847 | ||
| 862 | } // endif: there were events to write | 848 | } // endif: there were events to write |
| 863 | 849 |
inst/cta/test/data/crab_cntmap.fits.gz
No preview for this file type
inst/cta/test/data/crab_events.fits.gz
No preview for this file type