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

Function TEST

isis/tests/OsirisRexMapCamModuleTests.cpp:103–225  ·  view source on GitHub ↗

* MapCamModuleExplodeReuniteTest * * 1) Mapcam image 20190223T023051S790_map_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 app outputs the image backplanes into 7 separate cubes. * 4) cubeit reunites the explode

Source from the content-addressed store, hash-verified

101 * - 20190223T023051S790_map_iofL2pan_V001_cubeit.cub
102 */
103TEST(OsirisRexMapCamModules, MapCamModuleExplodeReuniteTest) {
104 QTemporaryDir tempDir;
105
106 // ingest mapcam fits format image with ocams2isis and then spiceinit
107 QString mapCamFileName = tempDir.path() + "/20190223T023051S790_map_iofL2pan.cub";
108 QVector<QString> ocams2isisArgs = {"from=data/osirisRexImages/ocams/20190223T023051S790_map_iofL2pan.fits",
109 "to=" + mapCamFileName};
110
111 UserInterface ocams2isisMapCam(OCAMS2ISIS_XML, ocams2isisArgs);
112 try {
113 ocams2isis(ocams2isisMapCam);
114 }
115 catch (IException &e) {
116 FAIL() << "Unable to run ocams2isis on mapcam fits file 20190223T023051S790_map_iofL2pan.fits: "
117 << e.what() << std::endl;
118 }
119
120 QVector<QString> spiceinitArgs = {"from=" + mapCamFileName};
121 UserInterface spiceinitMapCam(SPICEINIT_XML, spiceinitArgs);
122 try {
123 spiceinit(spiceinitMapCam);
124 }
125 catch (IException &e) {
126 FAIL() << "Unable to run spiceinit on mapcam image: " << e.what() << std::endl;
127 }
128
129 // phocube mapcam image to create backplanes for latitude, longitude, phase angle,
130 // emission angle, incidence angle, and pixel resolution;
131 // dn=y propagates input pixel to output file
132 QString phocubeFileName = tempDir.path() + "/20190223T023051S790_map_iofL2pan_bp.cub";
133 QVector<QString> phocubeArgs = {"from=" + mapCamFileName,
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 mapcam image: " << e.what() << std::endl;
146 }
147
148 // explode image backplanes into 7 cubes
149 QVector<QString> explodeArgs = {"from=" + phocubeFileName,
150 "to=" + tempDir.path() + "/20190223T023051S790_map_iofL2pan_V001"};
151 UserInterface explodeUI(EXPLODE_XML, explodeArgs);
152 try {
153 explode(explodeUI);
154 }
155 catch (IException &e) {
156 FAIL() << "Unable to run explode on phocubed mapcam image: " << e.what() << std::endl;
157 }
158
159 // reunite exploded cubes
160 // output should be identical to phocube bp output above

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