Commit dde1b854c40d9e6a60278725ba5b965b05646a1a
1 parent
fdfb897d
add constructor from FITS file
Showing
3 changed files
with
22 additions
and
2 deletions
include/GFits.hpp
pyext/GFits.i
src/fits/GFits.cpp
| ... | ... | @@ -46,7 +46,7 @@ |
| 46 | 46 | ***************************************************************************/ |
| 47 | 47 | GFits::GFits() |
| 48 | 48 | { |
| 49 | - // Initialise class members for clean destruction | |
| 49 | + // Initialise class members | |
| 50 | 50 | init_members(); |
| 51 | 51 | |
| 52 | 52 | // Return |
| ... | ... | @@ -55,13 +55,31 @@ GFits::GFits() |
| 55 | 55 | |
| 56 | 56 | |
| 57 | 57 | /***********************************************************************//** |
| 58 | + * @brief Constructor from FITS file | |
| 59 | + * | |
| 60 | + * @param[in] filename FITS file name | |
| 61 | + ***************************************************************************/ | |
| 62 | +GFits::GFits(const std::string& filename) | |
| 63 | +{ | |
| 64 | + // Initialise class members | |
| 65 | + init_members(); | |
| 66 | + | |
| 67 | + // Open specified FITS file | |
| 68 | + open(filename); | |
| 69 | + | |
| 70 | + // Return | |
| 71 | + return; | |
| 72 | +} | |
| 73 | + | |
| 74 | + | |
| 75 | +/***********************************************************************//** | |
| 58 | 76 | * @brief Copy constructor |
| 59 | 77 | * |
| 60 | 78 | * @param[in] fits FITS file from which the instance should be built. |
| 61 | 79 | ***************************************************************************/ |
| 62 | 80 | GFits::GFits(const GFits& fits) |
| 63 | 81 | { |
| 64 | - // Initialise class members for clean destruction | |
| 82 | + // Initialise class members | |
| 65 | 83 | init_members(); |
| 66 | 84 | |
| 67 | 85 | // Copy members | ... | ... |