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

Function TEST

isis/tests/OsirisRexSamCamModuleTests.cpp:101–238  ·  view source on GitHub ↗

* SamCamModuleExplodeReuniteTest * * 1) SamCam image 20200811T221418S029_sam_iofL2pan5.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 app reunites the exploded cubes. * 5)

Source from the content-addressed store, hash-verified

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

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