Isis 3 Programmer Reference
HiLab.cpp
1
7
/* SPDX-License-Identifier: CC0-1.0 */
8
9
#include "HiLab.h"
10
#include "IException.h"
11
12
using namespace
std
;
13
14
namespace
Isis
{
19
HiLab::HiLab
(
Cube
*cube) {
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
41
int
HiLab::getCcd
() {
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
}
Isis::Cube
IO Handler for Isis Cubes.
Definition
Cube.h:168
Isis::Cube::group
PvlGroup & group(const QString &group) const
Read a group from the cube into a Label.
Definition
Cube.cpp:1998
Isis::HiLab::p_channel
int p_channel
Value of the ChannelNumber keyword from the cube's Instrument group.
Definition
HiLab.h:92
Isis::HiLab::getCcd
int getCcd()
Returns the value of the ccd from a lookup table based on the cpmm number.
Definition
HiLab.cpp:41
Isis::HiLab::HiLab
HiLab(Cube *cube)
Constructs a HiLab Object.
Definition
HiLab.cpp:19
Isis::HiLab::p_cpmmNumber
int p_cpmmNumber
Value of the CpmmNumber keyword from the cube's Instrument group.
Definition
HiLab.h:90
Isis::HiLab::p_bin
int p_bin
Value of the Summing keyword from the cube's Instrument group, if it exists.
Definition
HiLab.h:94
Isis::HiLab::p_tdi
int p_tdi
Value of the Tdi keyword from the cube's Instrument group, if it exists.
Definition
HiLab.h:96
Isis::IException
Isis exception class.
Definition
IException.h:91
Isis::IException::Io
@ Io
A type of error that occurred when performing an actual I/O operation.
Definition
IException.h:155
Isis::PvlContainer::hasKeyword
bool hasKeyword(const QString &name) const
Check to see if a keyword exists.
Definition
PvlContainer.cpp:159
Isis::PvlGroup
Contains multiple PvlContainers.
Definition
PvlGroup.h:41
Isis
This is free and unencumbered software released into the public domain.
Definition
Apollo.h:16
std
Namespace for the standard library.
src
mro
objs
HiLab
HiLab.cpp