File: fitsiochecker.h

package info (click to toggle)
wsclean 2.8-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 2,196 kB
  • sloc: cpp: 34,504; ansic: 234; python: 174; makefile: 10
file content (32 lines) | stat: -rw-r--r-- 657 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#ifndef FITS_IO_CHECKER_H
#define FITS_IO_CHECKER_H

#include <string>

class FitsIOChecker
{
protected:
	static void checkStatus(int status, const std::string& filename);
	static void checkStatus(int status, const std::string& filename, const std::string& operation);
public:
	enum Unit {
		JanskyPerBeam,
		JanskyPerPixel,
		Jansky,
		Kelvin,
		MilliKelvin
	};
	static const char* UnitName(Unit unit) {
		switch(unit)
		{
			case JanskyPerBeam: return "Jansky/beam";
			case JanskyPerPixel: return "Jansky/pixel";
			case Jansky: return "Jansky";
			case Kelvin: return "Kelvin";
			case MilliKelvin: return "Milli-Kelvin";
		}
		return "";
	}
};

#endif