Isis 3 Programmer Reference
HiLab.cpp
1
7/* SPDX-License-Identifier: CC0-1.0 */
8
9#include "HiLab.h"
10#include "IException.h"
11
12using namespace std;
13
14namespace Isis {
20 PvlGroup group = cube->group("Instrument");
21 p_cpmmNumber = group["CpmmNumber"];
22 p_channel = group["ChannelNumber"];
23
24 if(group.hasKeyword("Summing")) {
25 p_bin = group["Summing"];
26 }
27 else {
28 std::string msg = "Cannot find required Summing keyword in label";
29 throw IException(IException::Io, msg, _FILEINFO_);
30 }
31
32 if(group.hasKeyword("Tdi")) {
33 p_tdi = group["Tdi"];
34 }
35 else {
36 std::string msg = "Cannot find required Tdi keyword in label";
37 throw IException(IException::Io, msg, _FILEINFO_);
38 }
39 }
40
42 const int cpmm2ccd[] = {0, 1, 2, 3, 12, 4, 10, 11, 5, 13, 6, 7, 8, 9};
43 return cpmm2ccd[p_cpmmNumber];
44 }
45}
IO Handler for Isis Cubes.
Definition Cube.h:168
PvlGroup & group(const QString &group) const
Read a group from the cube into a Label.
Definition Cube.cpp:1997
int p_channel
Value of the ChannelNumber keyword from the cube's Instrument group.
Definition HiLab.h:92
int getCcd()
Returns the value of the ccd from a lookup table based on the cpmm number.
Definition HiLab.cpp:41
HiLab(Cube *cube)
Constructs a HiLab Object.
Definition HiLab.cpp:19
int p_cpmmNumber
Value of the CpmmNumber keyword from the cube's Instrument group.
Definition HiLab.h:90
int p_bin
Value of the Summing keyword from the cube's Instrument group, if it exists.
Definition HiLab.h:94
int p_tdi
Value of the Tdi keyword from the cube's Instrument group, if it exists.
Definition HiLab.h:96
Isis exception class.
Definition IException.h:91
@ Io
A type of error that occurred when performing an actual I/O operation.
Definition IException.h:155
bool hasKeyword(const QString &name) const
Check to see if a keyword exists.
Contains multiple PvlContainers.
Definition PvlGroup.h:41
This is free and unencumbered software released into the public domain.
Definition Apollo.h:16
Namespace for the standard library.