MCPcopy Create free account
hub / github.com/DOI-USGS/ISIS3 / TEST

Function TEST

isis/tests/OsirisRexPolyCamModuleTests.cpp:101–227  ·  view source on GitHub ↗

* PolyCamModuleExplodeReuniteTest * * 1) PolyCam image 20190328T200344S309_pol_iofL2pan.fits is ingested with ocams2isis and * spiceinited. * 2) phocube is used to create latitude, longitude, phase angle, emission angle, * incidence angle, and pixel resolution backplanes. * 3) explode outputs the image backplanes into 7 separate cubes. * 4) cubeit reunites the exploded

Source from the content-addressed store, hash-verified

99 * - 20190328T200344S309_pol_iofL2pan_V001_cubeit.cub
100 */
101TEST(OsirisRexPolyCamModules, PolyCamModuleExplodeReuniteTest) {
102 QTemporaryDir tempDir;
103
104 // ingest polycam fits format image with ocams2isis
105 QString polyCamFileName = tempDir.path() + "/20190328T200344S309_pol_iofL2pan.cub";
106 QVector<QString> ocams2isisArgs = {"from=data/osirisRexImages/ocams/20190328T200344S309_pol_iofL2pan.fits",
107 "to=" + polyCamFileName};
108
109 UserInterface ocams2isisPolyCam(OCAMS2ISIS_XML, ocams2isisArgs);
110 try {
111 ocams2isis(ocams2isisPolyCam);
112 }
113 catch (IException &e) {
114 FAIL() << "Unable to run ocams2isis on polycam fits file 20190328T200344S309_pol_iofL2pan.fits: "
115 << e.what() << std::endl;
116 }
117
118 // spiceinit ingested cube
119 QVector<QString> spiceinitArgs = {"from=" + polyCamFileName};
120 UserInterface spiceinitPolyCam(SPICEINIT_XML, spiceinitArgs);
121 try {
122 spiceinit(spiceinitPolyCam);
123 }
124 catch (IException &e) {
125 FAIL() << "Unable to run spiceinit on polycam cube 20190328T200344S309_pol_iofL2pan.cub: "
126 << e.what() << std::endl;
127 }
128
129 // phocube polycam image to create latitude, longitude, phase angle, emission angle,
130 // incidence angle, and pixel resolution backplanes;
131 // dn=y propagates input pixel to output file
132 QString phocubeFileName = tempDir.path() + "/20190328T200344S309_pol_iofL2pan_bp.cub";
133 QVector<QString> phocubeArgs = {"from=" + polyCamFileName,
134 "to=" + phocubeFileName,
135 "dn=y",
136 "phase=y",
137 "emission=y",
138 "incidence=y",
139 "pixelresolution=y"};
140 UserInterface phocubeUI(PHOCUBE_XML, phocubeArgs);
141 try {
142 phocube(phocubeUI);
143 }
144 catch (IException &e) {
145 FAIL() << "Unable to run phocube on polycam cube 20190328T200344S309_pol_iofL2pan.cub: "
146 << e.what() << std::endl;
147 }
148
149 // explode image backplanes into 7 cubes
150 QVector<QString> explodeArgs = {"from=" + phocubeFileName,
151 "to=" + tempDir.path() + "/20190328T200344S309_pol_iofL2pan_V001"};
152 UserInterface explodeUI(EXPLODE_XML, explodeArgs);
153 try {
154 explode(explodeUI);
155 }
156 catch (IException &e) {
157 FAIL() << "Unable to run explode on phocubed polycam cube 20190328T200344S309_pol_iofL2pan_bp.cub: "
158 << e.what() << std::endl;

Callers

nothing calls this directly

Calls 15

ocams2isisFunction · 0.85
spiceinitFunction · 0.85
phocubeFunction · 0.85
explodeFunction · 0.85
cubeitFunction · 0.85
algebraFunction · 0.85
getsnFunction · 0.85
caminfoFunction · 0.85
camstatsFunction · 0.85
statsFunction · 0.85
camptFunction · 0.85
mosrangeFunction · 0.85

Tested by

no test coverage detected