@brief Opens the FITS file with fits_open_file*/
| 102 | |
| 103 | /** @brief Opens the FITS file with fits_open_file*/ |
| 104 | static FitsHandle OpenFile(const char *path, int mode) { |
| 105 | int status = 0; |
| 106 | fitsfile *ff = nullptr; |
| 107 | |
| 108 | FITS_CALL(fits_open_file(&ff, path, mode, &status)); |
| 109 | DALI_ENFORCE(status == 0, |
| 110 | make_string("Failed to open a file: ", path, " Make sure it exists!")); |
| 111 | |
| 112 | return FitsHandle(ff); |
| 113 | } |
| 114 | |
| 115 | |
| 116 | /** @brief Calls fits_close_file on the file handle */ |