mxlib
c++ tools for analyzing astronomical data and other tasks by Jared R. Males. [git repo]
Loading...
Searching...
No Matches
fitsFile.cpp
Go to the documentation of this file.
1/** \file fitsFile.cpp
2 * \brief Definitions for a class to work with FITS files
3 * \ingroup fits_processing_files
4 * \author Jared R. Males (jaredmales@gmail.com)
5 *
6 */
7
8//***********************************************************************//
9// Copyright 2025 Jared R. Males (jaredmales@gmail.com)
10//
11// This file is part of mxlib.
12//
13// mxlib is free software: you can redistribute it and/or modify
14// it under the terms of the GNU General Public License as published by
15// the Free Software Foundation, either version 3 of the License, or
16// (at your option) any later version.
17//
18// mxlib is distributed in the hope that it will be useful,
19// but WITHOUT ANY WARRANTY; without even the implied warranty of
20// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21// GNU General Public License for more details.
22//
23// You should have received a copy of the GNU General Public License
24// along with mxlib. If not, see <http://www.gnu.org/licenses/>.
25//***********************************************************************//
26
28
29namespace mx
30{
31namespace fits
32{
33
34namespace fitsFileDetail
35{
36
37namespace
38{
39
40int openFile( fitsfile **fptr, const char *fileName, int mode, int *status )
41{
42 return fits_open_file( fptr, fileName, mode, status );
43}
44
45long *allocateLongs( size_t count )
46{
47 return new long[count];
48}
49
50} // namespace
51
52fitsFileCfitsioOps &fitsFileCfitsioOpsInstance()
53{
54 static fitsFileCfitsioOps
55 operations{ openFile, ffgidm, ffgisz, ffclos, ffgsv, ffghsp, ffgkyn, ffinit, ffcrim, ffppx, allocateLongs };
56 return operations;
57}
58
59void resetFitsFileCfitsioOps()
60{
61 fitsFileCfitsioOpsInstance() = fitsFileCfitsioOps{ openFile,
62 ffgidm,
63 ffgisz,
64 ffclos,
65 ffgsv,
66 ffghsp,
67 ffgkyn,
68 ffinit,
69 ffcrim,
70 ffppx,
71 allocateLongs };
72}
73
74} // namespace fitsFileDetail
75
76template class fitsFile<short, verbose::d>;
77
79
80template class fitsFile<int, verbose::d>;
81
83
84template class fitsFile<float, verbose::d>;
85
86template class fitsFile<double, verbose::d>;
87
88} // namespace fits
89} // namespace mx
Class to manage interactions with a FITS file.
Definition fitsFile.hpp:84
Declares and defines a class to work with a FITS file.
The mxlib c++ namespace.
Definition mxlib.hpp:37